@@ -7,13 +7,13 @@ sidebarTitle: auth
77
88## Classes
99
10- ### ` AccessToken ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L32 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
10+ ### ` AccessToken ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L36 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
1111
1212
1313AccessToken that includes all JWT claims.
1414
1515
16- ### ` AuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L38 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
16+ ### ` AuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L42 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
1717
1818
1919Base class for all FastMCP authentication providers.
@@ -26,7 +26,7 @@ custom authentication routes.
2626
2727** Methods:**
2828
29- #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L65 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
29+ #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L69 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
3030
3131``` python
3232verify_token(self , token: str ) -> AccessToken | None
@@ -43,7 +43,7 @@ All auth providers must implement token verification.
4343- AccessToken object if valid, None if invalid or expired
4444
4545
46- #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L78 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
46+ #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L82 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
4747
4848``` python
4949get_routes(self , mcp_path: str | None = None ) -> list[Route]
@@ -67,7 +67,7 @@ provider does not create the actual MCP endpoint route.
6767- List of all routes for this provider (excluding the MCP endpoint itself)
6868
6969
70- #### ` get_well_known_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L101 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
70+ #### ` get_well_known_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L105 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
7171
7272``` python
7373get_well_known_routes(self , mcp_path: str | None = None ) -> list[Route]
@@ -95,7 +95,7 @@ This is used to construct path-scoped well-known URLs.
9595- List of well-known discovery routes (typically mounted at root level)
9696
9797
98- #### ` get_middleware ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L133 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
98+ #### ` get_middleware ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L137 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
9999
100100``` python
101101get_middleware(self ) -> list
@@ -107,7 +107,7 @@ Get HTTP application-level middleware for this auth provider.
107107- List of Starlette Middleware instances to apply to the HTTP app
108108
109109
110- ### ` TokenVerifier ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L166 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
110+ ### ` TokenVerifier ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L170 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
111111
112112
113113Base class for token verifiers (Resource Servers).
@@ -118,7 +118,7 @@ Token verifiers typically don't provide authentication routes by default.
118118
119119** Methods:**
120120
121- #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L187 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
121+ #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L191 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
122122
123123``` python
124124verify_token(self , token: str ) -> AccessToken | None
@@ -127,7 +127,7 @@ verify_token(self, token: str) -> AccessToken | None
127127Verify a bearer token and return access info if valid.
128128
129129
130- ### ` RemoteAuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L192 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
130+ ### ` RemoteAuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L196 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
131131
132132
133133Authentication provider for resource servers that verify tokens from known authorization servers.
@@ -144,7 +144,7 @@ the authorization servers that issue valid tokens.
144144
145145** Methods:**
146146
147- #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L233 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
147+ #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L237 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
148148
149149``` python
150150verify_token(self , token: str ) -> AccessToken | None
@@ -153,7 +153,7 @@ verify_token(self, token: str) -> AccessToken | None
153153Verify token using the configured token verifier.
154154
155155
156- #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L237 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
156+ #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L241 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
157157
158158``` python
159159get_routes(self , mcp_path: str | None = None ) -> list[Route]
@@ -164,7 +164,7 @@ Get routes for this provider.
164164Creates protected resource metadata routes (RFC 9728).
165165
166166
167- ### ` OAuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L265 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
167+ ### ` OAuthProvider ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L269 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
168168
169169
170170OAuth Authorization Server provider.
@@ -175,7 +175,7 @@ authorization flows, token issuance, and token verification.
175175
176176** Methods:**
177177
178- #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L321 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
178+ #### ` verify_token ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L332 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
179179
180180``` python
181181verify_token(self , token: str ) -> AccessToken | None
@@ -193,7 +193,7 @@ to our existing load_access_token method.
193193- AccessToken object if valid, None if invalid or expired
194194
195195
196- #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L336 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
196+ #### ` get_routes ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L347 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
197197
198198``` python
199199get_routes(self , mcp_path: str | None = None ) -> list[Route]
0 commit comments