Add subject and claims to AccessToken (#2686)

This commit is contained in:
Max 2026-05-26 14:13:55 +01:00 • committed by GitHub
commit 3eb579948a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,6 +181,7 @@ class SimpleOAuthProvider(OAuthAuthorizationServerProvider[AuthorizationCode, Re
scopes=[self.settings.mcp_scope],
code_challenge=code_challenge,
resource=resource, # RFC 8707
subject=username,
)
self.auth_codes[new_code] = auth_code
@ -219,6 +220,7 @@ class SimpleOAuthProvider(OAuthAuthorizationServerProvider[AuthorizationCode, Re
scopes=authorization_code.scopes,
expires_at=int(time.time()) + 3600,
resource=authorization_code.resource, # RFC 8707
subject=authorization_code.subject,
)
# Store user data mapping for this token