xsecuremcp / docs /python-sdk /fastmcp-server-auth-auth.mdx
zzstoatzz
update api ref for new `mdxify` version
a2aa9d2
Raw
History Blame
850 Bytes
---
title: auth
sidebarTitle: auth
---
# `fastmcp.server.auth.auth`
## Classes
### `OAuthProvider` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L14" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
**Methods:**
#### `verify_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
verify_token(self, token: str) -> AccessToken | None
```
Verify a bearer token and return access info if valid.
This method implements the TokenVerifier protocol by delegating
to our existing load_access_token method.
**Args:**
- `token`: The token string to validate
**Returns:**
- AccessToken object if valid, None if invalid or expired