-
Notifications
You must be signed in to change notification settings - Fork 3
Cleaning Expired and Revoked OAuth2 Tokens
Eliza Margaretha edited this page Apr 16, 2024
·
5 revisions
This service enables system admin to remove expired and revoked access and refresh OAuth2 tokens from the database. It requires admin authentication either by using the Authorization header or including an admin token in the request body. At server starts-up, Kustvakt automatically generates an adminToken file at the data folder, if it has not existed already.
Available in: full version
Method: POST
Service URL: root/admin/oauth2/token/clean
Header Parameters
Name | Required | Description | Value |
---|---|---|---|
Content-Type | yes | content type of the input data | application/x-www-form-urlencoded |
Authorization | yes, if admin token is not included in the request | HTTP authentication with scheme: Bearer | OAuth2 access token |
Request body URL-encoded form parameters
Name | Required | Description | Type |
---|---|---|---|
token | yes, if authorization header is not included | The admin token automatically generated by Kustvakt server in the root folder | String |
Request with admin token
Run the command on the root folder containing the admin token file:
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \
-d @adminToken \
http://localhost:8089/api/v1.0/admin/oauth2/token/clean
or describe an adminToken explicitly in the command:
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'token=Rn8zb30nkqVlHd_Wxt2DpE' \
http://localhost:8089/api/v1.0/admin/oauth2/token/clean
Request with authorization header
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Bearer f70p9lBCIufy_9LYEef2jQzJLlBMpc1egkv4dCBxcD3A' \
-X POST \
'http://localhost:8089/api/v1.0/admin/oauth2/token/clean'
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery