Class CustomOAuth2User
- java.lang.Object
-
- com.xebialabs.platform.sso.oidc.user.CustomOAuth2User
-
- All Implemented Interfaces:
java.io.Serializable,org.springframework.security.core.AuthenticatedPrincipal,org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal,org.springframework.security.oauth2.core.user.OAuth2User
- Direct Known Subclasses:
CustomOidcUser
public class CustomOAuth2User extends java.lang.Object implements org.springframework.security.oauth2.core.user.OAuth2User, java.io.SerializableCustom class which is replica of theDefaultOAuth2UserOnce 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 CustomOAuth2User(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String nameAttributeKey)Constructs aCustomOAuth2Userusing the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Map<java.lang.String,java.lang.Object>getAttributes()java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()java.lang.StringgetName()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
CustomOAuth2User
public CustomOAuth2User(java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String nameAttributeKey)Constructs aCustomOAuth2Userusing the provided parameters.- Parameters:
authorities- the authorities granted to the userattributes- the attributes about the usernameAttributeKey- the key used to access the user's "name" fromgetAttributes()
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.springframework.security.core.AuthenticatedPrincipal
-
getAuthorities
public java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributesin interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-