Skip to content

Commit

Permalink
fix: add 'authorization_details' to introspection response
Browse files Browse the repository at this point in the history
  • Loading branch information
vivshankar committed Sep 2, 2024
1 parent 7d2dd98 commit b760ff9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions introspection_response_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ func (f *Fosite) WriteIntrospectionResponse(ctx context.Context, rw http.Respons
response["username"] = r.GetAccessRequester().GetSession().GetUsername()
}

if rfc9396Requester, ok := r.GetAccessRequester().(RFC9396Requester); ok {
ad := rfc9396Requester.GetGrantedAuthorizationDetails()
if len(ad) > 0 {
response["authorization_details"] = ad
}
}

rw.Header().Set("Content-Type", "application/json;charset=UTF-8")
rw.Header().Set("Cache-Control", "no-store")
rw.Header().Set("Pragma", "no-cache")
Expand Down

0 comments on commit b760ff9

Please sign in to comment.