Class CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
- java.lang.Object
-
- software.amazon.awssdk.crt.auth.credentials.CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
-
- Enclosing class:
- CognitoCredentialsProvider
public static class CognitoCredentialsProvider.CognitoCredentialsProviderBuilder extends Object
A builder class for the Cognito provider and its options
-
-
Constructor Summary
Constructors Constructor Description CognitoCredentialsProviderBuilder()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CognitoCredentialsProvider
build()
Creates a new Cognito credentials provider, based on this builder's configurationString
getCustomRoleArn()
String
getEndpoint()
String
getIdentity()
ArrayList<CognitoCredentialsProvider.CognitoLoginTokenPair>
getLogins()
CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withClientBootstrap(ClientBootstrap clientBootstrap)
(Optional) Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withCustomRoleArn(String customRoleArn)
(optional) Sets the ARN of the role to be assumed when multiple roles were received in the token from the identity provider.CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withEndpoint(String endpoint)
Sets the Cognito service endpoint to use when sourcing credentials via HTTPCognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withHttpProxyOptions(HttpProxyOptions httpProxyOptions)
Sets the proxy configuration to use when making the http request that fetches session credentials from the AWS Cognito Identity serviceCognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withIdentity(String identity)
Sets the Cognito identity to source credentials forCognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withLogin(CognitoCredentialsProvider.CognitoLoginTokenPair login)
Adds an identity provider token pair to allow for authenticated identity access.CognitoCredentialsProvider.CognitoCredentialsProviderBuilder
withTlsContext(TlsContext tlsContext)
Sets the tls context to use when making HTTP requests to the Cognito Identity service
-
-
-
Method Detail
-
withEndpoint
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withEndpoint(String endpoint)
Sets the Cognito service endpoint to use when sourcing credentials via HTTP- Parameters:
endpoint
- cognito service endpoint to use- Returns:
- The current builder
-
getEndpoint
public String getEndpoint()
-
withIdentity
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withIdentity(String identity)
Sets the Cognito identity to source credentials for- Parameters:
identity
- the cognito identity to source credentials for- Returns:
- The current builder
-
getIdentity
public String getIdentity()
-
withCustomRoleArn
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withCustomRoleArn(String customRoleArn)
(optional) Sets the ARN of the role to be assumed when multiple roles were received in the token from the identity provider.- Parameters:
customRoleArn
- ARN of the role to be assumed when multiple roles were received in the token from the identity provider- Returns:
- The current builder
-
getCustomRoleArn
public String getCustomRoleArn()
-
withLogin
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withLogin(CognitoCredentialsProvider.CognitoLoginTokenPair login)
Adds an identity provider token pair to allow for authenticated identity access.- Parameters:
login
- identity provider token pair- Returns:
- The current builder
-
getLogins
public ArrayList<CognitoCredentialsProvider.CognitoLoginTokenPair> getLogins()
-
withClientBootstrap
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withClientBootstrap(ClientBootstrap clientBootstrap)
(Optional) Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.- Parameters:
clientBootstrap
- client bootstrap to use- Returns:
- The current builder
-
withTlsContext
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withTlsContext(TlsContext tlsContext)
Sets the tls context to use when making HTTP requests to the Cognito Identity service- Parameters:
tlsContext
- the tls context to use when making HTTP requests- Returns:
- The current builder
-
withHttpProxyOptions
public CognitoCredentialsProvider.CognitoCredentialsProviderBuilder withHttpProxyOptions(HttpProxyOptions httpProxyOptions)
Sets the proxy configuration to use when making the http request that fetches session credentials from the AWS Cognito Identity service- Parameters:
httpProxyOptions
- proxy configuration for the credentials fetching http request- Returns:
- The current builder
-
build
public CognitoCredentialsProvider build()
Creates a new Cognito credentials provider, based on this builder's configuration- Returns:
- a new Cognito credentials provider
-
-