Class CachingClientCredentialsFlow
java.lang.Object
org.apache.juneau.rest.server.auth.oauth.CachingClientCredentialsFlow
Server-side caching decorator layering an optional
TokenCache over the role-neutral
OAuthClientCredentialsFlow.
The neutral flow performs the RFC 6749 §4.4 client-credentials token acquisition; this decorator adds the
server-side (clientId, scope)-keyed cache so repeat callers within the cache window reuse the token rather
than hitting the IdP on each call. When no cache is configured the decorator
simply delegates to the neutral flow.
Usage
- Since:
- 10.0.0
-
Constructor Details
-
CachingClientCredentialsFlow
Constructor.- Parameters:
b- The builder.
-
-
Method Details
-
create
Static creator.- Returns:
- A new builder.
-
acquire
Acquires a token, returning the cached token when a fresh one is present.- Returns:
- The acquired token.
-