Add per-client token TTL and expiry support for client credentials#77
Open
abhishek-kaushik wants to merge 3 commits into
Open
Add per-client token TTL and expiry support for client credentials#77abhishek-kaushik wants to merge 3 commits into
abhishek-kaushik wants to merge 3 commits into
Conversation
Member
|
@abhishek-kaushik could you give me a review of #75 (I added you to this repo) so we can merge tests, and then add test with this PR |
Collaborator
Author
sure @joehoyle , can do it |
Member
|
Ok tests per merged, you should be able to add tests here now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Access_Token::create_for_client()reads the TTL from the client and sets anexpirestimestamp on the token at creation time.401 Unauthorized.expires_inin token response — The/oauth2/access_tokenendpoint includesexpires_inin the response only when the token actually has an expiry.Backwards Compatibility
Existing clients have no TTL stored — tokens issued to them will not expire. New clients opt in by setting a TTL value in the admin UI.