gogs/internal/route/api/v1
George Baugh a9db2abd98 Add DELETE /users/$USER/tokens
Arguments: SHA1 of token.

This allows useful workflows like applications which can build
and then delete a token for its exclusive use during a session.

Requires that a PR to go-gogs-client merges first.

Currently you can test that it works by cloning my branch of
go-gogs-client, or picking the following commit:

https://github.com/teodesian/go-gogs-client/
commit/4488fbb10902b695e7df8c76fa5d6edf5394e0eb

and running:

go mod init && go mod tidy

and finally going back in to this repo to do:

go mod edit -replace=github.com/gogs/go-gogs-client=$CLONEDIR
go mod tidy
go build -o gogs

I have tested this endpoint on a local install and verified it works.
Beyond that, no automated tests have been added.
2024-08-19 15:35:58 -05:00
..
admin all: unwrap `database.UsersStore` interface (#7708) 2024-03-27 23:18:59 -04:00
convert all: unwrap `database.UsersStore` interface (#7708) 2024-03-27 23:18:59 -04:00
misc autofix: fix check for empty string (#6804) 2022-03-06 16:33:45 +08:00
org all: unwrap `database.UsersStore` interface (#7708) 2024-03-27 23:18:59 -04:00
repo all: unwrap `database.UsersStore` interface (#7708) 2024-03-27 23:18:59 -04:00
user Add DELETE /users/$USER/tokens 2024-08-19 15:35:58 -05:00
api.go Add DELETE /users/$USER/tokens 2024-08-19 15:35:58 -05:00