--- title: revocation sidebarTitle: revocation --- # `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` ```python get_client(self, client_id: str) -> OAuthClientInformationFull | None ``` #### `register_client` ```python register_client(self, client_info: OAuthClientInformationFull) -> None ``` #### `authorize` ```python authorize(self, client: OAuthClientInformationFull, params: AuthorizationParams) -> str ``` #### `load_authorization_code` ```python load_authorization_code(self, client: OAuthClientInformationFull, authorization_code: str) -> AuthorizationCode | None ``` #### `exchange_authorization_code` ```python exchange_authorization_code(self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode) -> OAuthToken ``` #### `exchange_refresh_token` ```python exchange_refresh_token(self, client: OAuthClientInformationFull, refresh_token: RefreshToken, scopes: list[str]) -> OAuthToken ``` #### `exchange_identity_assertion` ```python exchange_identity_assertion(self, client: OAuthClientInformationFull, params: IdentityAssertionParams) -> OAuthToken ``` #### `load_access_token` ```python load_access_token(self, token: str) -> AccessToken | None ``` #### `load_refresh_token` ```python load_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str) -> RefreshToken | None ``` #### `revoke_token` ```python revoke_token(self, token: AccessToken | RefreshToken) -> None ```