-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated FolioClient to use dynamic properties for api token values #28
Updated FolioClient to use dynamic properties for api token values #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the general approach. I've left three comments in the code.
…itional RTR data. Implemented okapi_token and okapi_headers as dynamic properties that should always return a valid api token. Fixes Implement support for refresh tokens for FOLIO API keys (Poppy) #27
3a37bf7
to
7495308
Compare
…n headers to be updated by dictionary key/value assignment
e714502
to
312c820
Compare
@todolson Can you give this another quick glance. I've pulled out the refresh token approach in favor of just logging in again (per recommendation here: https://wiki.folio.org/x/Lyq-BQ#RefreshTokenRotation(RTR)-Aguidefornon-moduleclientssuchasscriptsorotherintegrations). I've also implemented the |
@bltravis , I've not used properties in earnest, and I'm a bit rusty in any case, so it took me a bit to get this. Have also confirmed in the REPL that this works. But it has the desired effect and I don't have any suggestions. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@todolson, Hmmm… 🤔 You're right. That really shouldn't be settable via the property. I've removed the setter and the deleter. |
Refactored login method to support login-with-expiry endpoint and additional RTR data. Implemented okapi_token and okapi_headers as dynamic properties that should always return a valid api token. Fixes Implement support for refresh tokens for FOLIO API keys (Poppy) #27
/authn/login-with-expiry
in addition to/authn/login
okapi_token
andokapi_headers
return a "fresh" api token when accessed