File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
examples/servers/simple-auth-client-credentials/mcp_simple_auth_client_credentials Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class AuthServerSettings(BaseModel):
4343 port : int = 9000
4444 server_url : AnyHttpUrl = AnyHttpUrl ("http://localhost:9000" )
4545
46- def create_authorization_server () -> Starlette :
46+ def create_authorization_server (server_settings : AuthServerSettings ) -> Starlette :
4747 """Create the Authorization Server application."""
4848
4949 routes = [
@@ -52,7 +52,7 @@ def create_authorization_server() -> Starlette:
5252 "/.well-known/oauth-authorization-server" ,
5353 endpoint = cors_middleware (
5454 MetadataHandler (metadata = OAuthMetadata (
55- issuer = AnyHttpUrl ( API_BASE ) ,
55+ issuer = server_settings . server_url ,
5656 authorization_endpoint = AnyHttpUrl (f"{ API_ENDPOINT } /oauth2/authorize" ),
5757 token_endpoint = AnyHttpUrl (f"{ API_ENDPOINT } /oauth2/token" ),
5858 token_endpoint_auth_methods_supported = ["client_secret_basic" ],
@@ -71,7 +71,7 @@ def create_authorization_server() -> Starlette:
7171
7272async def run_server (server_settings : AuthServerSettings ):
7373 """Run the Authorization Server."""
74- auth_server = create_authorization_server ()
74+ auth_server = create_authorization_server (server_settings )
7575
7676 config = Config (
7777 auth_server ,
You can’t perform that action at this time.
0 commit comments