Class CdpCredentialsProviderChain

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class CdpCredentialsProviderChain
    extends Object
    implements CdpCredentialsProvider
    CdpCredentialsProvider that chains together multiple credentials providers. When a caller first requests credentials from this provider, it calls all the providers in the chain, in the original order specified, until one can provide credentials, and then returns those credentials. If all of the credential providers in the chain have been called, and none of them can provide credentials, then this class will throw an exception indicated that no credentials are available.
    • Constructor Detail

      • CdpCredentialsProviderChain

        public CdpCredentialsProviderChain​(CdpCredentialsProvider... credentialProviders)
        credentialProviders - the credential providers
    • Method Detail

      • getCredentials

        public CdpCredentials getCredentials()
        Description copied from interface: CdpCredentialsProvider
        Returns CdpCredentials which the caller can use to authenticate a CDP request. Each implementation of CdpCredentialsProvider can chose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated.
        Specified by:
        getCredentials in interface CdpCredentialsProvider
        CdpCredentials which the caller can use to authenticate an CDP request.