feat: add CanSetUserinfoFromRequest interface (#347)
This commit is contained in:
parent
edc9a1f60d
commit
c9555c7f1b
4 changed files with 38 additions and 5 deletions
|
@ -190,6 +190,12 @@ func CreateIDToken(ctx context.Context, issuer string, request IDTokenRequest, v
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if fromRequest, ok := storage.(CanSetUserinfoFromRequest); ok {
|
||||
err := fromRequest.SetUserinfoFromRequest(ctx, userInfo, request, scopes)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
claims.SetUserInfo(userInfo)
|
||||
}
|
||||
if code != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue