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, String principalAttribute) 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.principalAttribute-Stringthe attribute name used to access the user's name from the user info response.- Returns:
OIDCUserInfocontaining user claims.
-
getClientRegistration
org.springframework.security.oauth2.client.registration.ClientRegistration getClientRegistration()Gets a client registration
-