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 OauthClientConfiguration
clientConfiguration
protected io.micronaut.http.MediaType
mediaType
protected SecureEndpoint
tokenEndpoint
-
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 OauthClientConfiguration
getClientConfiguration()
SecureEndpoint
getEndpoint()
io.micronaut.http.MediaType
getMediaType()
-
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:
getMediaType
in interfaceTokenRequestContext<G,R extends TokenResponse>
- Returns:
- The media type of the grant or body
-
getEndpoint
public SecureEndpoint getEndpoint()
- Specified by:
getEndpoint
in interfaceTokenRequestContext<G,R extends TokenResponse>
- Returns:
- The endpoint of which to send the request
-
getClientConfiguration
public OauthClientConfiguration getClientConfiguration()
- Specified by:
getClientConfiguration
in interfaceTokenRequestContext<G,R extends TokenResponse>
- Returns:
- The client configuration
-
-