Class OpenIdPasswordTokenRequestContext
java.lang.Object
io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext<Map<String,String>,OpenIdTokenResponse>
io.micronaut.security.oauth2.endpoint.token.request.context.OpenIdPasswordTokenRequestContext
- All Implemented Interfaces:
TokenRequestContext<Map<String,
String>, OpenIdTokenResponse>
public class OpenIdPasswordTokenRequestContext
extends AbstractTokenRequestContext<Map<String,String>,OpenIdTokenResponse>
A token request context for sending a password grant
request to an OpenID provider.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Field Summary
Fields inherited from class io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext
clientConfiguration, mediaType, tokenEndpoint
-
Constructor Summary
ConstructorDescriptionOpenIdPasswordTokenRequestContext
(AuthenticationRequest authenticationRequest, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.type.Argument<?>
getGrant()
protected static io.micronaut.http.MediaType
getMediaType
(OauthClientConfiguration clientConfiguration) Resolves the media type for the request body.io.micronaut.core.type.Argument<OpenIdTokenResponse>
Methods inherited from class io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext
getClientConfiguration, getEndpoint, getMediaType
-
Constructor Details
-
OpenIdPasswordTokenRequestContext
public OpenIdPasswordTokenRequestContext(AuthenticationRequest authenticationRequest, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration) - Parameters:
authenticationRequest
- The authentication requesttokenEndpoint
- The token endpointclientConfiguration
- The client configuration
-
-
Method Details
-
getGrant
- Returns:
- The grant or body of the request
-
getMediaType
protected static io.micronaut.http.MediaType getMediaType(OauthClientConfiguration clientConfiguration) Resolves the media type for the request body.- Parameters:
clientConfiguration
- The client configuration- Returns:
- The media type
-
getResponseType
- Returns:
- The response argument
-
getErrorResponseType
public io.micronaut.core.type.Argument<?> getErrorResponseType()- Returns:
- The error response argument
-