-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Forwarded ExpiredTokenException #11964
Conversation
Fixes #11919 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Whoa, I shouldn't debug things that rely on an internet connection while I am on the train 😱 I was going to say your fix doesn't work, but: no, it does!
Yess! 👍 :) Will report back tomorrow. Thanks for now, @rullzer! :) |
Normal time out for a token is an hour |
was 4 hours, so that's covered :) |
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 had troubles reproducing the issue. There is some logic to handle ExpiredTokenException
in
server/apps/oauth2/lib/Controller/OauthApiController.php
Lines 138 to 139 in 3556e78
} catch (ExpiredTokenException $e) { | |
$appToken = $e->getToken(); |
so it looks right to me to throw the exception up.
@danielkesselberg yeah it is tricky to fake. Requires a lot of waiting etc. Or manual manipulation. I'll try to come up with writing acceptance tests so we can make sure it keeps working ;) |
@rullzer I know I didn't really need to test this anymore, but I did so anyway. :D the issue remains solved as I successfully got a new token this morning. Thanks again. I think manual manipulation would be the way to go, right? Like changing the expires timestamp to something two hours ago... (Either GitHub or I have connectivity issues. I removed the spare comments...) |
1 similar comment
@rullzer I know I didn't really need to test this anymore, but I did so anyway. :D the issue remains solved as I successfully got a new token this morning. Thanks again. I think manual manipulation would be the way to go, right? Like changing the expires timestamp to something two hours ago... (Either GitHub or I have connectivity issues. I removed the spare comments...) |
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.
Makes sense!
Fixes #11919
This fixes an issue when the oauth part requests a token that is expired. Because of the migration path it woudl just return the InvalidTokenException instead of the ExpiredTokenException resulting in not renewing the token properly.
This was working all properly when introduced. But it got broken by the move to the PublicKey Tokens.
Guess this means time for integration and acceptance tests on the OAuth endpoint. I just need to think how to make the tokens directly expire then ;)
CC: @Dagefoerde