TsgcHTTP_OAuth2_Client › Methods › Introspect
Queries token status and metadata per RFC 7662.
procedure Introspect(const aToken: String; const aTokenTypeHint: String = '');
| Name | Type | Description |
|---|---|---|
aToken | const String | The access or refresh token whose state should be queried. |
aTokenTypeHint | const String | Optional hint about the token type, typically 'access_token' or 'refresh_token'. Defaults to an empty string. |
Sends a POST request to AuthorizationServerOptions.IntrospectionURL as defined in RFC 7662. The server responds with a JSON document indicating whether the token is active plus metadata such as scope, client_id, username, and exp. Requires AuthorizationServerOptions.IntrospectionURL to be set. Results are delivered via OnAfterIntrospectToken; errors via OnErrorIntrospectToken.
// Introspect the current access token
OAuth2Client.Introspect(OAuth2Client.AccessToken, 'access_token');
// Introspect without specifying the token type hint
OAuth2Client.Introspect(OAuth2Client.AccessToken);