Class AbstractTokenRequestContext<G,R extends TokenResponse>
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext<G,R>
-
- Type Parameters:
G- The grant or body of the requestR- The response type
- All Implemented Interfaces:
TokenRequestContext<G,R>
- Direct Known Subclasses:
OauthCodeTokenRequestContext,OauthPasswordTokenRequestContext,OpenIdCodeTokenRequestContext,OpenIdPasswordTokenRequestContext
public abstract class AbstractTokenRequestContext<G,R extends TokenResponse> extends java.lang.Object implements TokenRequestContext<G,R>
A base class that provides getters for common context properties.
-
-
Field Summary
Fields Modifier and Type Field Description protected OauthClientConfigurationclientConfigurationprotected io.micronaut.http.MediaTypemediaTypeprotected SecureEndpointtokenEndpoint
-
Constructor Summary
Constructors Constructor Description AbstractTokenRequestContext(io.micronaut.http.MediaType mediaType, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OauthClientConfigurationgetClientConfiguration()SecureEndpointgetEndpoint()io.micronaut.http.MediaTypegetMediaType()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.security.oauth2.endpoint.token.request.context.TokenRequestContext
getErrorResponseType, getGrant, getResponseType
-
-
-
-
Field Detail
-
mediaType
protected final io.micronaut.http.MediaType mediaType
-
tokenEndpoint
protected final SecureEndpoint tokenEndpoint
-
clientConfiguration
protected final OauthClientConfiguration clientConfiguration
-
-
Constructor Detail
-
AbstractTokenRequestContext
public AbstractTokenRequestContext(io.micronaut.http.MediaType mediaType, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration)- Parameters:
mediaType- The media typetokenEndpoint- The token endpointclientConfiguration- The client configuration
-
-
Method Detail
-
getMediaType
public io.micronaut.http.MediaType getMediaType()
- Specified by:
getMediaTypein interfaceTokenRequestContext<G,R extends TokenResponse>- Returns:
- The media type of the grant or body
-
getEndpoint
public SecureEndpoint getEndpoint()
- Specified by:
getEndpointin interfaceTokenRequestContext<G,R extends TokenResponse>- Returns:
- The endpoint of which to send the request
-
getClientConfiguration
public OauthClientConfiguration getClientConfiguration()
- Specified by:
getClientConfigurationin interfaceTokenRequestContext<G,R extends TokenResponse>- Returns:
- The client configuration
-
-