Make OAuth2 authorization code expire#40766
Merged
Conversation
AndyScherzinger
approved these changes
Oct 4, 2023
2a63356 to
4cb31e1
Compare
| if (!$table->hasColumn('code_created_at')) { | ||
| $table->addColumn('code_created_at', Types::BIGINT, [ | ||
| 'notnull' => true, | ||
| 'default' => 0, |
Member
There was a problem hiding this comment.
Suggested change
| 'default' => 0, | |
| 'unsigned' => true, |
Default 0 is automatically, unsigned will allow more numbers
Member
Author
There was a problem hiding this comment.
Why not explicitly setting the default to 0? I didn't know about it, maybe others don't know either.
Member
|
OpenAPI command also needs to be executed |
efde8a9 to
3e9e57b
Compare
5efcbd5 to
b2808af
Compare
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…have expired Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
… (active token) Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…t in authorization state Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
b2808af to
d56950a
Compare
This was referenced Jan 22, 2024
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.
Oauth authorization codes now expire 10 minutes after being created.
To know if a row in
oauth2_access_tokensis an authorization code or an access token, we keep track of the number of delivered access tokens. If no token was delivered, it means the row still contains an authorization code (in theencrypted_tokencolumn).authorization_codegrant type). This is no longer possible