public class DefaultCredentialProvider extends Object implements Provider
Follows the Provider CQS contract:
isExpired() / retrieve() are pure reads.refresh() is the only method that mutates state.
It either refreshes the last successful provider (when
reuseLastProviderEnabled is true) or walks the chain
and sets lastSuccessProvider on the first success.Intended to be wrapped in a CredentialProvider, which serializes
refresh through a ReadWriteLock and
guarantees the isExpired → refresh → retrieve sequence. Direct use
(without wrapping) is not a supported mode.
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCredentialProvider.Builder |
| Modifier and Type | Method and Description |
|---|---|
static DefaultCredentialProvider.Builder |
builder() |
static DefaultCredentialProvider |
create() |
boolean |
isExpired() |
void |
refresh() |
CredentialValue |
retrieve() |
public static DefaultCredentialProvider create()
public static DefaultCredentialProvider.Builder builder()
public void refresh()
throws ApiException
refresh in interface ProviderApiExceptionpublic CredentialValue retrieve() throws ApiException
retrieve in interface ProviderApiExceptionCopyright © 2026. All rights reserved.