Class DefaultCredentialProvider

  • All Implemented Interfaces:
    Provider

    public class DefaultCredentialProvider
    extends Object
    implements Provider
    Default provider chain. Walks a fixed list of providers on refresh, selecting the first provider that successfully obtains credentials.

    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.