-
Notifications
You must be signed in to change notification settings - Fork 0
Description
From Spike: #109
The
Line 32 in c68a1cc
| server.post('/authn/login', function (req, res) { |
Support for the folioAccessToken and folioRefreshToken has already be enabled in a past commit.
Actions
-
Change the default
/authn/loginend points to use the new end point. -
Update all documentation, readmes, wiki, etc...
Additional References and Quotes
Any scripts or 3rd party integrations with FOLIO that relied on the legacy, non-expiring tokens will need to be changed to use the new authn/login-with-expiry endpoint. Unlike the legacy endpoint, the new endpoint only returns the AT in the form of a Set-Cookie header in the HTTP response. To get the AT, client code needs to parse the cookie string to extract the AT since the cookie string contains other elements besides the token. What follows is an example of the cookie contents of a Set-Cookie headers returned from the login response.
Note that the response from login in contains two Set-Cookie headers, one for the RT and one for the AT. Client scripts only need concern themselves with the AT. If a new AT is needed, client code should request a new one by logging in again and not bother using the refresh endpoint.
We will eventually switch to Eureka.
Designs should keep in mind that the AT behavior will eventually change to something like the query below:
curl -sS -X GET \
"http://kong:8000/users-keycloak/users/<folio-user-uuid>" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "x-okapi-tenant: diku"See the following: