-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
missing route DELETE /users/{username}/tokens #4234
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
Comments
@techknowlogick I'm not sure what I did wrong. So the swagger docs display the delete route now. But when I try to list the tokens before delete, I got an unauthorized response. I tried hm even on my running 1.4.2 gitea, listing tokens doesn't work. |
@techknowlogick here #3842 (comment) @bkcsoft pointed out, that basic auth is required for listing tokens.
I also noticed that the
So the swagger specs should also be adjust (maybe with this merge request. |
CentOS release 6.9 (Final)
[x]
):Description
There are two API routes for the user auth token in the current swagger docs: https://try.gitea.io/api/swagger
but
DELETE
a token for a user is missing.See https://github.com/go-gitea/gitea/blob/908e8942ccae5b7966c7084780b3441e2190d9c1/routers/api/v1/user/app.go
So, what it needs (next to the swagger definitions) is, that the function
func DeleteAccessToken(ctx *context.APIContext)
in
gitea/routers/api/v1/user/app.go
is added, which calls
models.DeleteAccessTokenByID(token_id, user_id)
, right?Or is this route for some reason an unwanted feature?
The text was updated successfully, but these errors were encountered: