microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
4 stars 3 forks source link

Update `NmdcPortalApiClient` to use new Bearer token authentication #571

Closed pkalita-lbl closed 6 days ago

pkalita-lbl commented 1 week ago

With https://github.com/microbiomedata/nmdc-server/pull/1257 the Portal API has a new authentication mechanism. The class in nmdc-runtime (NmdcPortalApiClient) which interacts with that API needs to be updated in accordance. Instead of storing a session cookie in the environment, we need to store a refresh token (see also). A NmdcPortalApiClient instance needs to exchange that refresh token for an access token and then use the access token in the Authorization header with any subsequent requests.