Class SdkTokenProviderChain

    • Method Detail

      • of

        public static SdkTokenProviderChain of​(SdkTokenProvider... sdkTokenProviders)
        Create a token provider chain with default configuration that checks the given token providers.
        Parameters:
        sdkTokenProviders - The token providers that should be checked for token, in the order they should be checked.
        Returns:
        A token provider chain that checks the provided token providers in order.
      • of

        public static SdkTokenProviderChain of​(IdentityProvider<? extends TokenIdentity>... sdkTokenProviders)
        Create a token provider chain with default configuration that checks the given token providers.
        Parameters:
        sdkTokenProviders - The token providers that should be checked for token, in the order they should be checked.
        Returns:
        A token provider chain that checks the provided token providers in order.
      • resolveToken

        public SdkToken resolveToken()
        Description copied from interface: SdkTokenProvider
        Returns an SdkToken that can be used to authorize a request. Each implementation of SdkTokenProvider can choose its own strategy for loading token. For example, an implementation might load token from an existing key management system, or load new token when token is refreshed.
        Specified by:
        resolveToken in interface SdkTokenProvider
        Returns:
        AwsToken which the caller can use to authorize an AWS request using token authorization for a request.