Class DefaultOpenIdAuthorizationResponseHandler<T>
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.response.DefaultOpenIdAuthorizationResponseHandler<T>
- Type Parameters:
T
- Request
- All Implemented Interfaces:
OpenIdAuthorizationResponseHandler
@Requires(beans={OpenIdTokenResponseValidator.class,OpenIdAuthenticationMapper.class,TokenEndpointClient.class,OauthRouteUrlBuilder.class}) @Requires(configuration="io.micronaut.security.token.jwt")
@Singleton
public class DefaultOpenIdAuthorizationResponseHandler<T>
extends Object
implements OpenIdAuthorizationResponseHandler
Default implementation of
OpenIdAuthorizationResponseHandler
.- Since:
- 1.2.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionDefaultOpenIdAuthorizationResponseHandler
(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<AuthenticationResponse>
handle
(OpenIdAuthorizationResponse authorizationResponse, OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, @Nullable OpenIdAuthenticationMapper authenticationMapper, SecureEndpoint tokenEndpoint) Receives the authorization response and ultimately returns the authentication response.
-
Constructor Details
-
DefaultOpenIdAuthorizationResponseHandler
public DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable @Nullable StateValidator stateValidator, @Nullable @Nullable PkcePersistence pkcePersistence) - Parameters:
tokenResponseValidator
- The token response validatorauthenticationMapper
- Authentication MappertokenEndpointClient
- The token endpoint clientoauthRouteUrlBuilder
- The oauth route url builderstateValidator
- The state validatorpkcePersistence
- The PKCE persistence
-
-
Method Details
-
handle
public org.reactivestreams.Publisher<AuthenticationResponse> handle(OpenIdAuthorizationResponse authorizationResponse, OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, @Nullable @Nullable OpenIdAuthenticationMapper authenticationMapper, SecureEndpoint tokenEndpoint) Description copied from interface:OpenIdAuthorizationResponseHandler
Receives the authorization response and ultimately returns the authentication response.- Specified by:
handle
in interfaceOpenIdAuthorizationResponseHandler
- Parameters:
authorizationResponse
- The authorization responseclientConfiguration
- The client configurationopenIdProviderMetadata
- The provider metadataauthenticationMapper
- The user details mappertokenEndpoint
- The token endpoint- Returns:
- An authentication response publisher
-