-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix updating and deleting authtokens #17397
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
Fix updating and deleting authtokens #17397
Conversation
7e64658 to
39ab291
Compare
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.
Nice catch
|
/backport to stable17 |
|
/backport to stable16 |
|
Nice catch! I would prefer that update and destroy catch the exception. |
Added some tests for this pr. Feel free to push them. |
39ab291 to
56b90db
Compare
|
Hello @kesselb, I added tests, thank you! |
Signed-off-by: Sergej Nikolaev <kinolaev@gmail.com>
56b90db to
9aa992e
Compare
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
|
backport to stable17 in #17415 |
|
/backport to stable16 |
|
backport to stable16 in #17416 |
Problem: updating and deleting expired authtokens don't works because
PublicKeyTokenProvider->getTokenByIdthrowsExpiredTokenExceptionand client receives response 404.Solution: we need to catch
ExpiredTokenExceptionand get token from this exception (as already implemented in OauthApiController)