Class DefaultOpenIdAuthorizationResponseHandler<T>
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.response.DefaultOpenIdAuthorizationResponseHandler<T>
- Type Parameters:
T
- Request
- All Implemented Interfaces:
OpenIdAuthorizationResponseHandler
@Requires(classes=com.nimbusds.jwt.JWT.class) @Requires(beans={ReactiveOpenIdTokenResponseValidator.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) 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) Deprecated, for removal: This API element is subject to removal in a future version.DefaultOpenIdAuthorizationResponseHandler
(ReactiveOpenIdTokenResponseValidator<com.nimbusds.jwt.JWT> 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
@Inject public DefaultOpenIdAuthorizationResponseHandler(ReactiveOpenIdTokenResponseValidator<com.nimbusds.jwt.JWT> 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
-
DefaultOpenIdAuthorizationResponseHandler
@Deprecated(since="4.8.0", forRemoval=true) public DefaultOpenIdAuthorizationResponseHandler(OpenIdTokenResponseValidator tokenResponseValidator, OpenIdAuthenticationMapper authenticationMapper, TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder<T> oauthRouteUrlBuilder, @Nullable @Nullable StateValidator stateValidator, @Nullable @Nullable PkcePersistence pkcePersistence, @Named("blocking") ExecutorService blockingExecutor) 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 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: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
-
DefaultOpenIdAuthorizationResponseHandler(ReactiveOpenIdTokenResponseValidator, OpenIdAuthenticationMapper, TokenEndpointClient, OauthRouteUrlBuilder, StateValidator, PkcePersistence)
instead