Skip to main content

fastmcp.server.auth.oauth_proxy.revocation

Revocation-only view of an OAuth proxy’s tokens for the SDK ownership check.

Classes

RevocableAccessToken

An access token loaded by the revocation route. token is the upstream token, which every FastMCP access token of one grant shares. fastmcp_jti names the FastMCP token the client presented, so revocation can retire that token itself. When the grant’s upstream token no longer validates, token is the FastMCP token and upstream_live is False: there is nothing upstream left to revoke, but the mapping must still go, or the next refresh would revive the token.

RevocationProvider

Adapt only the operations used by the SDK’s revocation handler. Normal token loads preserve the upstream user identity. The revocation ownership gate instead needs the downstream client from our verified JWT. Keeping this adapter private to the route avoids changing authentication results or mutating tokens cached by upstream verifiers. Methods:

get_client

register_client

authorize

load_authorization_code

exchange_authorization_code

exchange_refresh_token

exchange_identity_assertion

load_access_token

load_refresh_token

revoke_token