@Singleton public class DefaultTokenEndpointClient extends java.lang.Object implements TokenEndpointClient
TokenEndpointClient
.Constructor and Description |
---|
DefaultTokenEndpointClient(io.micronaut.context.BeanContext beanContext,
io.micronaut.http.client.HttpClientConfiguration defaultClientConfiguration) |
Modifier and Type | Method and Description |
---|---|
protected io.micronaut.http.client.HttpClient |
getClient(java.lang.String providerName)
Retrieves a client for the given provider.
|
protected <G,R extends TokenResponse> |
secureRequest(io.micronaut.http.MutableHttpRequest<G> request,
TokenRequestContext<G,R> requestContext)
Secures the request according to the context's endpoint supported authentication
methods.
|
<G,R extends TokenResponse> |
sendRequest(TokenRequestContext<G,R> requestContext) |
public DefaultTokenEndpointClient(io.micronaut.context.BeanContext beanContext, io.micronaut.http.client.HttpClientConfiguration defaultClientConfiguration)
beanContext
- The bean contextdefaultClientConfiguration
- The default client configuration@NonNull public <G,R extends TokenResponse> org.reactivestreams.Publisher<R> sendRequest(TokenRequestContext<G,R> requestContext)
sendRequest
in interface TokenEndpointClient
G
- The token request grant or bodyR
- The token response typerequestContext
- The token request contextprotected <G,R extends TokenResponse> void secureRequest(@NonNull io.micronaut.http.MutableHttpRequest<G> request, TokenRequestContext<G,R> requestContext)
G
- The token request grant or bodyR
- The token response typerequest
- Token endpoint RequestrequestContext
- The request contextprotected io.micronaut.http.client.HttpClient getClient(java.lang.String providerName)
providerName
- The provider name