Class CustomOidcUser
- java.lang.Object
-
- com.xebialabs.platform.sso.oidc.user.CustomOAuth2User
-
- com.xebialabs.platform.sso.oidc.user.CustomOidcUser
-
- All Implemented Interfaces:
java.io.Serializable,org.springframework.security.core.AuthenticatedPrincipal,org.springframework.security.oauth2.core.ClaimAccessor,org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal,org.springframework.security.oauth2.core.oidc.IdTokenClaimAccessor,org.springframework.security.oauth2.core.oidc.StandardClaimAccessor,org.springframework.security.oauth2.core.oidc.user.OidcUser,org.springframework.security.oauth2.core.user.OAuth2User
public class CustomOidcUser extends CustomOAuth2User implements org.springframework.security.oauth2.core.oidc.user.OidcUser
Custom class which is replica of theDefaultOidcUserOnce https://github.com/spring-projects/spring-security/issues/9366 is addressed, this class can be removed.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken)Constructs aCustomOidcUserusing the provided parameters.CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, java.lang.String nameAttributeKey)Constructs aCustomOidcUserusing the provided parameters.CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.oauth2.core.oidc.OidcUserInfo userInfo)Constructs aCustomOidcUserusing the provided parameters.CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.oauth2.core.oidc.OidcUserInfo userInfo, java.lang.String nameAttributeKey)Constructs aCustomOidcUserusing the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getClaims()org.springframework.security.oauth2.core.oidc.OidcIdTokengetIdToken()org.springframework.security.oauth2.core.oidc.OidcUserInfogetUserInfo()-
Methods inherited from class com.xebialabs.platform.sso.oidc.user.CustomOAuth2User
equals, getAttributes, getAuthorities, getName, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
containsClaim, getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, hasClaim
-
Methods inherited from interface org.springframework.security.oauth2.core.oidc.IdTokenClaimAccessor
getAccessTokenHash, getAudience, getAuthenticatedAt, getAuthenticationContextClass, getAuthenticationMethods, getAuthorizationCodeHash, getAuthorizedParty, getExpiresAt, getIssuedAt, getIssuer, getNonce, getSubject
-
Methods inherited from interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
getAttribute, getAttributes, getAuthorities
-
Methods inherited from interface org.springframework.security.oauth2.core.oidc.StandardClaimAccessor
getAddress, getBirthdate, getEmail, getEmailVerified, getFamilyName, getFullName, getGender, getGivenName, getLocale, getMiddleName, getNickName, getPhoneNumber, getPhoneNumberVerified, getPicture, getPreferredUsername, getProfile, getUpdatedAt, getWebsite, getZoneInfo
-
-
-
-
Constructor Detail
-
CustomOidcUser
public CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken)Constructs aCustomOidcUserusing the provided parameters.- Parameters:
authorities- the authorities granted to the useridToken- theID Tokencontaining claims about the user
-
CustomOidcUser
public CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, java.lang.String nameAttributeKey)Constructs aCustomOidcUserusing the provided parameters.- Parameters:
authorities- the authorities granted to the useridToken- theID Tokencontaining claims about the usernameAttributeKey- the key used to access the user's "name" fromCustomOAuth2User.getAttributes()
-
CustomOidcUser
public CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.oauth2.core.oidc.OidcUserInfo userInfo)Constructs aCustomOidcUserusing the provided parameters.- Parameters:
authorities- the authorities granted to the useridToken- theID Tokencontaining claims about the useruserInfo- theUserInfocontaining claims about the user, may benull
-
CustomOidcUser
public CustomOidcUser(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, org.springframework.security.oauth2.core.oidc.OidcIdToken idToken, org.springframework.security.oauth2.core.oidc.OidcUserInfo userInfo, java.lang.String nameAttributeKey)Constructs aCustomOidcUserusing the provided parameters.- Parameters:
authorities- the authorities granted to the useridToken- theID Tokencontaining claims about the useruserInfo- theUserInfocontaining claims about the user, may benullnameAttributeKey- the key used to access the user's "name" fromCustomOAuth2User.getAttributes()
-
-
Method Detail
-
getClaims
public java.util.Map<java.lang.String,java.lang.Object> getClaims()
- Specified by:
getClaimsin interfaceorg.springframework.security.oauth2.core.ClaimAccessor- Specified by:
getClaimsin interfaceorg.springframework.security.oauth2.core.oidc.user.OidcUser
-
getIdToken
public org.springframework.security.oauth2.core.oidc.OidcIdToken getIdToken()
- Specified by:
getIdTokenin interfaceorg.springframework.security.oauth2.core.oidc.user.OidcUser
-
getUserInfo
public org.springframework.security.oauth2.core.oidc.OidcUserInfo getUserInfo()
- Specified by:
getUserInfoin interfaceorg.springframework.security.oauth2.core.oidc.user.OidcUser
-
-