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:
ClientCredentialsTokenRequestContext
,OauthCodeTokenRequestContext
,OauthPasswordTokenRequestContext
,OpenIdCodeTokenRequestContext
,OpenIdPasswordTokenRequestContext
public abstract class AbstractTokenRequestContext<G,R extends TokenResponse>
extends Object
implements TokenRequestContext<G,R>
A base class that provides getters for common context properties.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final OauthClientConfiguration
protected final io.micronaut.http.MediaType
protected final SecureEndpoint
-
Constructor Summary
ConstructorDescriptionAbstractTokenRequestContext
(io.micronaut.http.MediaType mediaType, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.MediaType
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 Details
-
mediaType
protected final io.micronaut.http.MediaType mediaType -
tokenEndpoint
-
clientConfiguration
-
-
Constructor Details
-
AbstractTokenRequestContext
public AbstractTokenRequestContext(io.micronaut.http.MediaType mediaType, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration) - Parameters:
mediaType
- The media typetokenEndpoint
- The token endpointclientConfiguration
- The client configuration
-
-
Method Details
-
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
- Specified by:
getEndpoint
in interfaceTokenRequestContext<G,
R extends TokenResponse> - Returns:
- The endpoint of which to send the request
-
getClientConfiguration
- Specified by:
getClientConfiguration
in interfaceTokenRequestContext<G,
R extends TokenResponse> - Returns:
- The client configuration
-