Skip to content

buildRevocationRequest

buildRevocationRequest(discovery, config, token, tokenTypeHint?): HttpRequest | null

Defined in: packages/core/src/revocation.ts:17

Builds an HTTP request to revoke an OAuth 2.0 token. Returns null if the discovery document has no revocation_endpoint.

OidcDiscovery

The OIDC discovery document.

OidcConfig

The OIDC client configuration.

string

The token to revoke (access or refresh token).

"refresh_token" | "access_token"

Optional hint indicating whether the token is an access_token or refresh_token.

HttpRequest | null

An HttpRequest for the revocation endpoint, or null if the endpoint is not available.

RFC 7009 §2.1 — Token Revocation Request