-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support endpoint for refreshing auth token #14
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
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.
The implementation here is straightforward and there's not much to say about it.
But let's bikeshed some naming, shall we? ;-)
Where in the public API is the term Knox
mentioned? I perceive this to be the name of a library used by the Argus server, and is as such an internal implementation detail of the server. I therefore don't see why it has any bearing on how things are named in the API client.
The client library has no support for any pre-existing token endpoints, so I don't see any need to differentiate naming from something that didn't exist. If we add more token solutions to the Argus server, then the problem of differentiating different solutions is an Argus server problem first and foremost.
I would simply call this an "Opaque API token" - and also add a proper docstring to the resource function to explain what the API call actually means for the client.
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 alternative name. This approval is pending that we get the tests to run properly (i.e. we need to fix #15 and rebase this).
6667967
to
8687da0
Compare
I'll add some docs to README, hold your horses |
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.
Minimal typos detected. Last minute stress changes are always a bitch, eh? ;)
The token will be regenerated and a new expiration date will be set, so it is necessary to rebuild the client with the new token afterwards. This is documented in the README and as a doc string on the `refresh_token` client method.
6268e20
to
c64e4ce
Compare
Quality Gate passedIssues Measures |
The token will be regenerated and a new expiration date will be set, so it is necessary to rebuild the client with the new token afterwards.
The endpoint only exists in version 2 of the API though.