public static final class UserPoolClientOptions.Builder
extends java.lang.Object
UserPoolClientOptions
Constructor and Description |
---|
Builder() |
public UserPoolClientOptions.Builder accessTokenValidity(Duration accessTokenValidity)
UserPoolClientOptions.getAccessTokenValidity()
accessTokenValidity
- Validity of the access token.
Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity.this
public UserPoolClientOptions.Builder authFlows(AuthFlow authFlows)
UserPoolClientOptions.getAuthFlows()
authFlows
- The set of OAuth authentication flows to enable on the client.this
public UserPoolClientOptions.Builder disableOAuth(java.lang.Boolean disableOAuth)
UserPoolClientOptions.getDisableOAuth()
disableOAuth
- Turns off all OAuth interactions for this client.this
public UserPoolClientOptions.Builder enableTokenRevocation(java.lang.Boolean enableTokenRevocation)
UserPoolClientOptions.getEnableTokenRevocation()
enableTokenRevocation
- Enable token revocation for this client.this
public UserPoolClientOptions.Builder generateSecret(java.lang.Boolean generateSecret)
UserPoolClientOptions.getGenerateSecret()
generateSecret
- Whether to generate a client secret.this
public UserPoolClientOptions.Builder idTokenValidity(Duration idTokenValidity)
UserPoolClientOptions.getIdTokenValidity()
idTokenValidity
- Validity of the ID token.
Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity.this
public UserPoolClientOptions.Builder oAuth(OAuthSettings oAuth)
UserPoolClientOptions.getOAuth()
oAuth
- OAuth settings for this client to interact with the app.
An error is thrown when this is specified and disableOAuth
is set.this
public UserPoolClientOptions.Builder preventUserExistenceErrors(java.lang.Boolean preventUserExistenceErrors)
UserPoolClientOptions.getPreventUserExistenceErrors()
preventUserExistenceErrors
- Whether Cognito returns a UserNotFoundException exception when the user does not exist in the user pool (false), or whether it returns another type of error that doesn't reveal the user's absence.this
public UserPoolClientOptions.Builder readAttributes(ClientAttributes readAttributes)
UserPoolClientOptions.getReadAttributes()
readAttributes
- The set of attributes this client will be able to read.this
public UserPoolClientOptions.Builder refreshTokenValidity(Duration refreshTokenValidity)
UserPoolClientOptions.getRefreshTokenValidity()
refreshTokenValidity
- Validity of the refresh token.
Values between 60 minutes and 10 years are valid.this
public UserPoolClientOptions.Builder supportedIdentityProviders(java.util.List<? extends UserPoolClientIdentityProvider> supportedIdentityProviders)
UserPoolClientOptions.getSupportedIdentityProviders()
supportedIdentityProviders
- The list of identity providers that users should be able to use to sign in using this client.this
public UserPoolClientOptions.Builder userPoolClientName(java.lang.String userPoolClientName)
UserPoolClientOptions.getUserPoolClientName()
userPoolClientName
- Name of the application client.this
public UserPoolClientOptions.Builder writeAttributes(ClientAttributes writeAttributes)
UserPoolClientOptions.getWriteAttributes()
writeAttributes
- The set of attributes this client will be able to write.this
public UserPoolClientOptions build()
UserPoolClientOptions
java.lang.NullPointerException
- if any required attribute was not provided