fix: merge user info claims into id token claims (#349)
oidc IDTokenClaims.SetUserInfo did not set the claims map from user info. This fix merges the claims map into the IDToken Claims map.
This commit is contained in:
parent
c9555c7f1b
commit
be3cc13c27
2 changed files with 9 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/muhlemmer/gu"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/text/language"
|
||||
"gopkg.in/square/go-jose.v2"
|
||||
|
@ -181,6 +182,7 @@ func TestIDTokenClaims_SetUserInfo(t *testing.T) {
|
|||
UserInfoEmail: userInfoData.UserInfoEmail,
|
||||
UserInfoPhone: userInfoData.UserInfoPhone,
|
||||
Address: userInfoData.Address,
|
||||
Claims: gu.MapCopy(userInfoData.Claims),
|
||||
}
|
||||
|
||||
var got IDTokenClaims
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue