Interface IdentityServiceFacade
public interface IdentityServiceFacade
Allows to interact with the Identity Service
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceRepresents access token authorization with optional refresh token.static classstatic classstatic interfacestatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionReturnsIdentityServiceFacade.AccessTokenbased authorization for providedIdentityServiceFacade.AuthorizationGrant.decodeToken(String token) Decodes the access token into theIdentityServiceFacade.DecodedAccessTokenwhich contains claims connected with a given token.org.springframework.security.oauth2.client.registration.ClientRegistrationGets a client registrationgetUserInfo(String token, UserInfoAttrMapping userInfoAttrMapping) Gets claims about the authenticated user, such as name and email address, via the UserInfo endpoint of the OpenID provider.
-
Method Details
-
authorize
IdentityServiceFacade.AccessTokenAuthorization authorize(IdentityServiceFacade.AuthorizationGrant grant) throws IdentityServiceFacade.AuthorizationException ReturnsIdentityServiceFacade.AccessTokenbased authorization for providedIdentityServiceFacade.AuthorizationGrant.- Parameters:
grant- the OAuth2 grant provided by the Resource Owner.- Returns:
IdentityServiceFacade.AccessTokenAuthorizationcontaining access token and optional refresh token.- Throws:
IdentityServiceFacade.AuthorizationException
-
decodeToken
IdentityServiceFacade.DecodedAccessToken decodeToken(String token) throws IdentityServiceFacade.TokenDecodingException Decodes the access token into theIdentityServiceFacade.DecodedAccessTokenwhich contains claims connected with a given token.- Parameters:
token-Stringwith encoded access token value.- Returns:
IdentityServiceFacade.DecodedAccessTokencontaining decoded claims.- Throws:
IdentityServiceFacade.TokenDecodingException
-
getUserInfo
Gets claims about the authenticated user, such as name and email address, via the UserInfo endpoint of the OpenID provider.- Parameters:
token-Stringwith encoded access token value.userInfoAttrMapping-UserInfoAttrMappingcontaining the mapping of claims.- Returns:
DecodedTokenUsercontaining user claims orOptional.empty()if the token does not contain a username claim.
-
getClientRegistration
org.springframework.security.oauth2.client.registration.ClientRegistration getClientRegistration()Gets a client registration
-