TsgcHTTP_OAuth2_ServerMethods › RemoveTokenByRefreshToken

RemoveTokenByRefreshToken Method

Revokes the token pair identified by its refresh token value.

Syntax

function RemoveTokenByRefreshToken(const aRefreshToken: string): Boolean;

Parameters

NameTypeDescription
aRefreshTokenconst stringThe refresh token whose associated token pair (access + refresh) should be removed from the server store.

Return Value

Returns True when a matching refresh token is found and the related entry is removed; False when no matching token exists. (Boolean)

Remarks

Convenient when handling revocation requests that only carry the refresh token (per RFC 7009). Equivalent to RemoveToken but looks up the entry by refresh token instead of access token.

Example

// Revoke a token pair when only the refresh_token is available
OAuth2.RemoveTokenByRefreshToken('def456refreshtoken');

Back to Methods