Class StsProfileCredentialsProviderFactory

java.lang.Object
software.amazon.awssdk.services.sts.internal.StsProfileCredentialsProviderFactory
All Implemented Interfaces:
ChildProfileCredentialsProviderFactory

public final class StsProfileCredentialsProviderFactory extends Object implements ChildProfileCredentialsProviderFactory
An implementation of ChildProfileCredentialsProviderFactory that uses configuration in a profile to create a StsAssumeRoleCredentialsProvider.
  • Constructor Details

    • StsProfileCredentialsProviderFactory

      public StsProfileCredentialsProviderFactory()
  • Method Details

    • create

      public AwsCredentialsProvider create(AwsCredentialsProvider sourceCredentialsProvider, Profile profile)
      Description copied from interface: ChildProfileCredentialsProviderFactory
      Create a credentials provider for the provided profile, using the provided source credentials provider to authenticate with AWS. In the case of STS, the returned credentials provider is for a role that has been assumed, and the provided source credentials provider is the credentials that should be used to authenticate that the user is allowed to assume that role.
      Specified by:
      create in interface ChildProfileCredentialsProviderFactory
      Parameters:
      sourceCredentialsProvider - The credentials provider that should be used to authenticate the child credentials provider. This credentials provider should be closed when it is no longer used.
      profile - The profile that should be used to load the configuration necessary to create the child credentials provider.
      Returns:
      The credentials provider with permissions derived from the source credentials provider and profile.