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:
Tim Möhlmann 2023-03-27 16:41:09 +03:00 committed by GitHub
parent c9555c7f1b
commit be3cc13c27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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