Class DefaultClientCredentialsClient
java.lang.Object
io.micronaut.security.oauth2.client.clientcredentials.AbstractClientCredentialsClient
io.micronaut.security.oauth2.client.clientcredentials.DefaultClientCredentialsClient
- All Implemented Interfaces:
ClientCredentialsClient
ClientCredentialsClient
for OAuth 2.0 clients which configures the token endpoint information directly.- Since:
- 2.2.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.security.oauth2.client.clientcredentials.AbstractClientCredentialsClient
oauthClientConfiguration, scopeToPublisherMap, tokenEndpointClient
-
Constructor Summary
ConstructorDescriptionDefaultClientCredentialsClient
(@NonNull OauthClientConfiguration oauthClientConfiguration, @NonNull TokenEndpointClient tokenEndpointClient) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClientCredentialsTokenRequestContext
createTokenRequestContext
(@Nullable String scope) Methods inherited from class io.micronaut.security.oauth2.client.clientcredentials.AbstractClientCredentialsClient
expirationDate, getName, isExpired, isExpired, requestToken, requestToken
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.client.clientcredentials.ClientCredentialsClient
requestToken, requestToken
-
Constructor Details
-
DefaultClientCredentialsClient
public DefaultClientCredentialsClient(@NonNull @NonNull OauthClientConfiguration oauthClientConfiguration, @NonNull @NonNull TokenEndpointClient tokenEndpointClient) - Parameters:
oauthClientConfiguration
- The client configurationtokenEndpointClient
- The token endpoint client
-
-
Method Details
-
createTokenRequestContext
protected ClientCredentialsTokenRequestContext createTokenRequestContext(@Nullable @Nullable String scope) - Specified by:
createTokenRequestContext
in classAbstractClientCredentialsClient
- Parameters:
scope
- The requested scope for the client credentials request- Returns:
- A client credentials token request context
-