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
ConstructorsConstructorDescriptionDefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) Deprecated, for removal: This API element is subject to removal in a future version.DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence, ExecutorService blockingExecutor) -
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
@Inject public DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable @Nullable StateValidator stateValidator, @Nullable @Nullable PkcePersistence pkcePersistence, @Named("blocking") ExecutorService blockingExecutor) - Parameters:
tokenResponseValidator- The token response validatorauthenticationMapper- Authentication MappertokenEndpointClient- The token endpoint clientoauthRouteUrlBuilder- The oauth route url builderstateValidator- The state validatorpkcePersistence- The PKCE persistenceblockingExecutor- An executor for blocking operations
-
DefaultOpenIdAuthorizationResponseHandler
@Deprecated(forRemoval=true, since="2.7.0") public DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable @Nullable StateValidator stateValidator, @Nullable @Nullable PkcePersistence pkcePersistence) Deprecated, for removal: This API element is subject to removal in a future version.- 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:OpenIdAuthorizationResponseHandlerReceives the authorization response and ultimately returns the authentication response.- Specified by:
handlein interfaceOpenIdAuthorizationResponseHandler- Parameters:
authorizationResponse- The authorization responseclientConfiguration- The client configurationopenIdProviderMetadata- The provider metadataauthenticationMapper- The user details mappertokenEndpoint- The token endpoint- Returns:
- An authentication response publisher
-
DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator, OpenIdAuthenticationMapper, TokenEndpointClient, OauthRouteUrlBuilder, StateValidator, PkcePersistence, ExecutorService)instead