SciCatProject / backend-v3

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
13 stars 17 forks source link

Feature: nest.js and access_token #592

Open dylanmcreynolds opened 2 years ago

dylanmcreynolds commented 2 years ago

Access Token

The loopback3 version of backend accepts tokens via the access_token query parameter. The nest.js version accepts them via the Authorization: bearer header. Should the nest.js implementation accept both so that existing clients are more compatible?

Summary

In https://github.com/SciCatProject/pyscicat/pull/10#discussion_r811001158, we discuss how to send the token for pyscicat. Since that project is relatively new, several possibilities exist for maintaining forward compatibility with the nest.js implementation. However, before we bake a solution, I wanted to raise the possibility of supporting both methods of accepting access token in nest.js as there probably multiple clients that exist (pyscicat, the React-based app from MAX-IV, custom code that has been written at RFI).