Improve OAuth protected resource metadata URL construction per RFC 9728 (#1407)
This commit is contained in:
parent
814c9c024a
commit
df3e428ee8
1 changed files with 192 additions and 32 deletions
|
|
@ -32,7 +32,7 @@ class ResourceServerSettings(BaseSettings):
|
|||
# Server settings
|
||||
host: str = "localhost"
|
||||
port: int = 8001
|
||||
server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:8001")
|
||||
server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:8001/mcp")
|
||||
|
||||
# Authorization Server settings
|
||||
auth_server_url: AnyHttpUrl = AnyHttpUrl("http://localhost:9000")
|
||||
|
|
@ -137,7 +137,7 @@ def main(port: int, auth_server: str, transport: Literal["sse", "streamable-http
|
|||
|
||||
# Create settings
|
||||
host = "localhost"
|
||||
server_url = f"http://{host}:{port}"
|
||||
server_url = f"http://{host}:{port}/mcp"
|
||||
settings = ResourceServerSettings(
|
||||
host=host,
|
||||
port=port,
|
||||
|
|
|
|||
Loading…
Reference in a new issue