Add subject and claims to AccessToken (#2686)
This commit is contained in:
parent
e8e6484278
commit
3eb579948a
1 changed files with 27 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue