Class OidcUserAuthority
java.lang.Object
org.springframework.security.oauth2.core.user.OAuth2UserAuthority
org.springframework.security.oauth2.core.oidc.user.OidcUserAuthority
- All Implemented Interfaces:
Serializable
,GrantedAuthority
A
GrantedAuthority
that may be associated to an OidcUser
.- Since:
- 5.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOidcUserAuthority
(String authority, OidcIdToken idToken, OidcUserInfo userInfo) Constructs aOidcUserAuthority
using the provided parameters.OidcUserAuthority
(OidcIdToken idToken) Constructs aOidcUserAuthority
using the provided parameters.OidcUserAuthority
(OidcIdToken idToken, OidcUserInfo userInfo) Constructs aOidcUserAuthority
using the provided parameters and defaultsOAuth2UserAuthority.getAuthority()
toROLE_USER
. -
Method Summary
Methods inherited from class org.springframework.security.oauth2.core.user.OAuth2UserAuthority
getAttributes, getAuthority, toString
-
Constructor Details
-
OidcUserAuthority
Constructs aOidcUserAuthority
using the provided parameters.- Parameters:
idToken
- theID Token
containing claims about the user
-
OidcUserAuthority
Constructs aOidcUserAuthority
using the provided parameters and defaultsOAuth2UserAuthority.getAuthority()
toROLE_USER
. -
OidcUserAuthority
Constructs aOidcUserAuthority
using the provided parameters.
-
-
Method Details
-
getIdToken
Returns theID Token
containing claims about the user.- Returns:
- the
OidcIdToken
containing claims about the user.
-
getUserInfo
Returns theUserInfo
containing claims about the user, may benull
.- Returns:
- the
OidcUserInfo
containing claims about the user, ornull
-
equals
- Overrides:
equals
in classOAuth2UserAuthority
-
hashCode
public int hashCode()- Overrides:
hashCode
in classOAuth2UserAuthority
-