Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/servers/simple-auth/mcp_simple_auth/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ResourceServerSettings(BaseSettings):
# Server settings
host: str = "localhost"
port: int = 8001
server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:8001/mcp")
server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:8001")

# Authorization Server settings
auth_server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:9000")
Expand Down Expand Up @@ -128,7 +128,7 @@ def main(port: int, auth_server: str, transport: Literal["sse", "streamable-http

# Create settings
host = "localhost"
server_url = f"http://{host}:{port}/mcp"
server_url = f"http://{host}:{port}"
settings = ResourceServerSettings(
host=host,
port=port,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ async def exchange_refresh_token(
"""Exchange refresh token - not supported in this example."""
raise NotImplementedError("Refresh tokens not supported")

# TODO(Marcelo): The type hint is wrong. We need to fix, and test to check if it works.
async def revoke_token(self, token: str, token_type_hint: str | None = None) -> None: # type: ignore
async def revoke_token(self, token: AccessToken | RefreshToken) -> None:
"""Revoke a token."""
if token in self.tokens:
del self.tokens[token]
if token.token in self.tokens:
del self.tokens[token.token]
Loading