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):
43
43
port : int = 9000
44
44
server_url : AnyHttpUrl = AnyHttpUrl ("http://localhost:9000" )
45
45
46
- def create_authorization_server () -> Starlette :
46
+ def create_authorization_server (server_settings : AuthServerSettings ) -> Starlette :
47
47
"""Create the Authorization Server application."""
48
48
49
49
routes = [
@@ -52,7 +52,7 @@ def create_authorization_server() -> Starlette:
52
52
"/.well-known/oauth-authorization-server" ,
53
53
endpoint = cors_middleware (
54
54
MetadataHandler (metadata = OAuthMetadata (
55
- issuer = AnyHttpUrl ( API_BASE ) ,
55
+ issuer = server_settings . server_url ,
56
56
authorization_endpoint = AnyHttpUrl (f"{ API_ENDPOINT } /oauth2/authorize" ),
57
57
token_endpoint = AnyHttpUrl (f"{ API_ENDPOINT } /oauth2/token" ),
58
58
token_endpoint_auth_methods_supported = ["client_secret_basic" ],
@@ -71,7 +71,7 @@ def create_authorization_server() -> Starlette:
71
71
72
72
async def run_server (server_settings : AuthServerSettings ):
73
73
"""Run the Authorization Server."""
74
- auth_server = create_authorization_server ()
74
+ auth_server = create_authorization_server (server_settings )
75
75
76
76
config = Config (
77
77
auth_server ,
You can’t perform that action at this time.
0 commit comments