@@ -7,7 +7,7 @@ sidebarTitle: oauth
77
88## Functions
99
10- ### ` check_if_auth_required ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L40 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
10+ ### ` check_if_auth_required ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L41 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
1111
1212``` python
1313check_if_auth_required(mcp_url: str , httpx_kwargs: dict[str , Any] | None = None ) -> bool
@@ -22,47 +22,47 @@ Check if the MCP endpoint requires authentication by making a test request.
2222
2323## Classes
2424
25- ### ` ClientNotFoundError ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L36 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
25+ ### ` ClientNotFoundError ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L37 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
2626
2727
2828Raised when OAuth client credentials are not found on the server.
2929
3030
31- ### ` TokenStorageAdapter ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L70 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
31+ ### ` TokenStorageAdapter ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L71 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
3232
3333** Methods:**
3434
35- #### ` clear ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L98 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
35+ #### ` clear ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L99 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
3636
3737``` python
3838clear(self ) -> None
3939```
4040
41- #### ` get_tokens ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L103 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
41+ #### ` get_tokens ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L104 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
4242
4343``` python
4444get_tokens(self ) -> OAuthToken | None
4545```
4646
47- #### ` set_tokens ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L107 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
47+ #### ` set_tokens ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L108 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
4848
4949``` python
5050set_tokens(self , tokens: OAuthToken) -> None
5151```
5252
53- #### ` get_client_info ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L115 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
53+ #### ` get_client_info ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L116 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
5454
5555``` python
5656get_client_info(self ) -> OAuthClientInformationFull | None
5757```
5858
59- #### ` set_client_info ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L121 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
59+ #### ` set_client_info ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L122 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
6060
6161``` python
6262set_client_info(self , client_info: OAuthClientInformationFull) -> None
6363```
6464
65- ### ` OAuth ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L134 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
65+ ### ` OAuth ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L135 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
6666
6767
6868OAuth client provider for MCP servers with browser-based authentication.
@@ -73,7 +73,7 @@ a browser for user authorization and running a local callback server.
7373
7474** Methods:**
7575
76- #### ` redirect_handler ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L226 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
76+ #### ` redirect_handler ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L229 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
7777
7878``` python
7979redirect_handler(self , authorization_url: str ) -> None
@@ -82,7 +82,7 @@ redirect_handler(self, authorization_url: str) -> None
8282Open browser for authorization, with pre-flight check for invalid client.
8383
8484
85- #### ` callback_handler ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L247 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
85+ #### ` callback_handler ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L250 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
8686
8787``` python
8888callback_handler(self ) -> tuple[str , str | None ]
@@ -91,7 +91,7 @@ callback_handler(self) -> tuple[str, str | None]
9191Handle OAuth callback and return (auth_code, state).
9292
9393
94- #### ` async_auth_flow ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L286 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
94+ #### ` async_auth_flow ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L289 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
9595
9696``` python
9797async_auth_flow(self , request: httpx.Request) -> AsyncGenerator[httpx.Request, httpx.Response]
0 commit comments