ApsaraMQ for MQTT provides API operations that your application server uses to manage the lifecycle of authentication tokens. In the token-based authentication workflow, the application server calls these operations on the authorization server to apply for, validate, and revoke tokens on behalf of MQTT clients.
Token lifecycle
The following operations correspond to three stages in the token lifecycle:
Apply for a token -- Call ApplyToken to apply for a token from the authorization server.
Validate a token -- To check whether an issued token is still valid, call QueryToken.
Revoke a token -- To invalidate a token, call RevokeToken.
API operations
| Operation | Description |
|---|---|
| ApplyToken | Apply for a token. |
| QueryToken | Verify the validity of a token. |
| RevokeToken | Revoke a token. |
Set parameters and handle return values based on the API specifications linked in the table. Incorrect parameter values may cause the API call to fail.