Skip to content

Commit

Permalink
Update token_hook.go
Browse files Browse the repository at this point in the history
  • Loading branch information
3schwartz committed Nov 18, 2024
1 parent a5b2d75 commit e76d130
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oauth2/token_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type AccessRequestHook func(ctx context.Context, requester fosite.AccessRequeste
type Request struct {
// ClientID is the identifier of the OAuth 2.0 client.
ClientID string `json:"client_id"`
// RequestedScopes is the list of scopes requested to the OAuth 2.0 client.
RequestedScopes []string `json:"requested_scopes"`
// GrantedScopes is the list of scopes granted to the OAuth 2.0 client.
GrantedScopes []string `json:"granted_scopes"`
// GrantedAudience is the list of audiences granted to the OAuth 2.0 client.
Expand Down Expand Up @@ -168,6 +170,7 @@ func TokenHook(reg interface {

request := Request{
ClientID: requester.GetClient().GetID(),
RequestedScopes: requester.GetRequestedScopes(),
GrantedScopes: requester.GetGrantedScopes(),
GrantedAudience: requester.GetGrantedAudience(),
GrantTypes: requester.GetGrantTypes(),
Expand Down

0 comments on commit e76d130

Please sign in to comment.