Uh oh!
There was an error while loading. Please reload this page.
Make OAuth2 authorization code expire - #40766
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| /** @var string */ | ||
| protected $encryptedToken; | ||
| /** @var int */ | ||
| protected $codeCreatedAt; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| /** @var int */ | ||
| protected $codeCreatedAt; | ||
| /** @var int */ | ||
| protected $tokenCount; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
Uh oh!
There was an error while loading. Please reload this page.
2a63356 to
4cb31e1CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (!$table->hasColumn('code_created_at')) { | ||
| $table->addColumn('code_created_at', Types::BIGINT, [ | ||
| 'notnull' => true, | ||
| 'default' => 0, |
There was a problem hiding this comment.
| 'default' => 0, | |
| 'unsigned' => true, |
Default 0 is automatically, unsigned will allow more numbers
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nickvergessen
commented
Oct 4, 2023
OpenAPI command also needs to be executed |
Uh oh!
There was an error while loading. Please reload this page.
efde8a9 to
3e9e57bCompare5efcbd5 to
b2808afCompareSigned-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
d56950aCompare
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