Class DefaultOauthAuthorizationResponseHandler
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.response.DefaultOauthAuthorizationResponseHandler
- All Implemented Interfaces:
OauthAuthorizationResponseHandler
@Requires(beans={io.micronaut.http.client.HttpClientRegistry.class,TokenEndpointClient.class,OauthRouteUrlBuilder.class})
@Singleton
public class DefaultOauthAuthorizationResponseHandler
extends Object
implements OauthAuthorizationResponseHandler
Default implementation of
OauthAuthorizationResponseHandler.- Since:
- 1.2.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOauthAuthorizationResponseHandler(TokenEndpointClient tokenEndpointClient, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) Deprecated, for removal: This API element is subject to removal in a future version.DefaultOauthAuthorizationResponseHandler(TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder oauthRouteUrlBuilder, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<AuthenticationResponse> handle(AuthorizationResponse authorizationResponse, OauthClientConfiguration clientConfiguration, OauthAuthenticationMapper authenticationMapper, SecureEndpoint tokenEndpoint) Receives the authorization response and ultimately returns the authentication response.
-
Constructor Details
-
DefaultOauthAuthorizationResponseHandler
@Deprecated(forRemoval=true, since="5.5.2") public DefaultOauthAuthorizationResponseHandler(TokenEndpointClient tokenEndpointClient, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) Deprecated, for removal: This API element is subject to removal in a future version.UseDefaultOauthAuthorizationResponseHandler(TokenEndpointClient, OauthRouteUrlBuilder, StateValidator, PkcePersistence). A handler created with this constructor does not send theredirect_uriparameter to the token endpoint.- Parameters:
tokenEndpointClient- The token endpoint clientstateValidator- The state validatorpkcePersistence- The PKCE Persistence
-
DefaultOauthAuthorizationResponseHandler
@Inject public DefaultOauthAuthorizationResponseHandler(TokenEndpointClient tokenEndpointClient, OauthRouteUrlBuilder oauthRouteUrlBuilder, @Nullable StateValidator stateValidator, @Nullable PkcePersistence pkcePersistence) - Parameters:
tokenEndpointClient- The token endpoint clientoauthRouteUrlBuilder- The OAuth 2.0 route URL builder used to build theredirect_urisent to the token endpointstateValidator- The state validatorpkcePersistence- The PKCE Persistence- Since:
- 5.5.2
-
-
Method Details
-
handle
public org.reactivestreams.Publisher<AuthenticationResponse> handle(AuthorizationResponse authorizationResponse, OauthClientConfiguration clientConfiguration, OauthAuthenticationMapper authenticationMapper, SecureEndpoint tokenEndpoint) Description copied from interface:OauthAuthorizationResponseHandlerReceives the authorization response and ultimately returns the authentication response.- Specified by:
handlein interfaceOauthAuthorizationResponseHandler- Parameters:
authorizationResponse- The authorization responseclientConfiguration- The client configurationauthenticationMapper- The authetncation mappertokenEndpoint- The token endpoint- Returns:
- An authentication response publisher
-
DefaultOauthAuthorizationResponseHandler(TokenEndpointClient, OauthRouteUrlBuilder, StateValidator, PkcePersistence).