Added new user claim

added claim preferred_username for id token
and user endpoint reponse

Change-Id: Ie53e96120d617be667a79c263b299cd00f16901a
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-03-16 12:51:22 -03:00
parent 8d6f9a2fdb
commit b28d98aa4c
2 changed files with 2 additions and 1 deletions

View File

@ -176,6 +176,7 @@ final class UserService extends OAuth2ProtectedService implements IUserService
// Profile Claims
$claim_set->addClaim(new JWTClaim(StandardClaims::Name, new StringOrURI($user->getFullName())));
$claim_set->addClaim(new JWTClaim(StandardClaims::GivenName, new StringOrURI($user->getFirstName())));
$claim_set->addClaim(new JWTClaim(StandardClaims::PreferredUserName, new StringOrURI($user->getNickName())));
$claim_set->addClaim(new JWTClaim(StandardClaims::FamilyName, new StringOrURI($user->getLastName())));
$claim_set->addClaim(new JWTClaim(StandardClaims::NickName, new StringOrURI($user->getNickName())));
$claim_set->addClaim(new JWTClaim(StandardClaims::Picture, new StringOrURI($user->getPic())));