Class JdkAuthFactory.OAuth2TokenProvider
java.lang.Object
io.apicurio.registry.client.common.auth.JdkAuthFactory.OAuth2TokenProvider
- All Implemented Interfaces:
JdkAuthFactory.TokenProvider
- Enclosing class:
JdkAuthFactory
public static class JdkAuthFactory.OAuth2TokenProvider
extends Object
implements JdkAuthFactory.TokenProvider
OAuth2 token provider implementation using client credentials flow.
Thread-safe with automatic token caching and refresh.
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2TokenProvider(HttpClient httpClient, String tokenEndpoint, String clientId, String clientSecret, String scope) -
Method Summary
-
Constructor Details
-
OAuth2TokenProvider
public OAuth2TokenProvider(HttpClient httpClient, String tokenEndpoint, String clientId, String clientSecret, String scope)
-
-
Method Details
-
getToken
Description copied from interface:JdkAuthFactory.TokenProviderGets a valid access token, refreshing if necessary.- Specified by:
getTokenin interfaceJdkAuthFactory.TokenProvider- Returns:
- the access token
- Throws:
IOException- if token retrieval fails
-