TTMSMCPAccessTokenValidation Record
Outcome an application reports after checking a bearer access token presented with a request.
API unit family: TMS.MCP.Auth
Syntax
TTMSMCPAccessTokenValidation = record
Remarks
The record is filled in by a TTMSMCPValidateAccessTokenEvent handler. It is passed in cleared, so a handler only has to set the fields it can determine: leaving everything untouched denies the request. Of the fields below, only Valid, Scopes and ErrorDescription affect the answer sent to the client. The remaining fields are informational: they record what the handler learned about the token so the application can use it, and are not read while the request is being authorized.
Fields and properties
| Name | Type | Description |
|---|---|---|
ClientId |
string |
Identifier of the client application the token was issued to, when known. |
ErrorCode |
string |
Machine-readable reason the token was rejected, for the application's own logging. |
ErrorDescription |
string |
Human-readable explanation of why the token was rejected. |
ExpiresAt |
TDateTime |
Moment the token stops being valid, when the handler could determine it. |
Scopes |
TArray<string> |
Scopes the token actually grants. |
Subject |
string |
Identifier of the principal the token was issued for, when the handler could determine it. |
Valid |
Boolean |
Whether the token was accepted. False - the default - rejects the request with 401 Unauthorized and a challenge inviting the client to obtain a new token. |