Class DefaultClientCredentialsOpenIdClient
java.lang.Object
io.micronaut.security.oauth2.client.clientcredentials.AbstractClientCredentialsClient
io.micronaut.security.oauth2.client.clientcredentials.DefaultClientCredentialsOpenIdClient
- All Implemented Interfaces:
ClientCredentialsClient
Client for Client Credentials for OAuth 2.0 clients which user open id configuration.
- 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
ConstructorDescriptionDefaultClientCredentialsOpenIdClient
(@NonNull OauthClientConfiguration oauthClientConfiguration, @NonNull TokenEndpointClient tokenEndpointClient, Supplier<OpenIdProviderMetadata> openIdProviderMetadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClientCredentialsTokenRequestContext
createTokenRequestContext
(String scope) protected SecureEndpoint
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
-
DefaultClientCredentialsOpenIdClient
public DefaultClientCredentialsOpenIdClient(@NonNull @NonNull OauthClientConfiguration oauthClientConfiguration, @NonNull @NonNull TokenEndpointClient tokenEndpointClient, Supplier<OpenIdProviderMetadata> openIdProviderMetadata) - Parameters:
oauthClientConfiguration
- The client configurationtokenEndpointClient
- The token endpoint clientopenIdProviderMetadata
- The provider metadata
-
-
Method Details
-
createTokenRequestContext
- Specified by:
createTokenRequestContext
in classAbstractClientCredentialsClient
- Parameters:
scope
- The requested scope for the client credentials request- Returns:
- A client credentials token request context
-
getTokenEndpoint
- Returns:
- The Token endpoint using the information in the open id provider metadata
-