public static final class UserPoolClient.Builder
extends java.lang.Object
UserPoolClient
.Modifier and Type | Method and Description |
---|---|
UserPoolClient.Builder |
accessTokenValidity(Duration accessTokenValidity)
Validity of the access token.
|
UserPoolClient.Builder |
authFlows(AuthFlow authFlows)
The set of OAuth authentication flows to enable on the client.
|
UserPoolClient |
build() |
static UserPoolClient.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
UserPoolClient.Builder |
disableOAuth(java.lang.Boolean disableOAuth)
Turns off all OAuth interactions for this client.
|
UserPoolClient.Builder |
enableTokenRevocation(java.lang.Boolean enableTokenRevocation)
Enable token revocation for this client.
|
UserPoolClient.Builder |
generateSecret(java.lang.Boolean generateSecret)
Whether to generate a client secret.
|
UserPoolClient.Builder |
idTokenValidity(Duration idTokenValidity)
Validity of the ID token.
|
UserPoolClient.Builder |
oAuth(OAuthSettings oAuth)
OAuth settings for this client to interact with the app.
|
UserPoolClient.Builder |
preventUserExistenceErrors(java.lang.Boolean 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.
|
UserPoolClient.Builder |
readAttributes(ClientAttributes readAttributes)
The set of attributes this client will be able to read.
|
UserPoolClient.Builder |
refreshTokenValidity(Duration refreshTokenValidity)
Validity of the refresh token.
|
UserPoolClient.Builder |
supportedIdentityProviders(java.util.List<? extends UserPoolClientIdentityProvider> supportedIdentityProviders)
The list of identity providers that users should be able to use to sign in using this client.
|
UserPoolClient.Builder |
userPool(IUserPool userPool)
The UserPool resource this client will have access to.
|
UserPoolClient.Builder |
userPoolClientName(java.lang.String userPoolClientName)
Name of the application client.
|
UserPoolClient.Builder |
writeAttributes(ClientAttributes writeAttributes)
The set of attributes this client will be able to write.
|
public static UserPoolClient.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.UserPoolClient.Builder
.public UserPoolClient.Builder accessTokenValidity(Duration accessTokenValidity)
Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity.
Default: Duration.minutes(60)
accessTokenValidity
- Validity of the access token. This parameter is required.this
public UserPoolClient.Builder authFlows(AuthFlow authFlows)
Default: - all auth flows disabled
authFlows
- The set of OAuth authentication flows to enable on the client. This parameter is required.this
public UserPoolClient.Builder disableOAuth(java.lang.Boolean disableOAuth)
Default: false
disableOAuth
- Turns off all OAuth interactions for this client. This parameter is required.this
public UserPoolClient.Builder enableTokenRevocation(java.lang.Boolean enableTokenRevocation)
Default: true for new user pool clients
enableTokenRevocation
- Enable token revocation for this client. This parameter is required.this
public UserPoolClient.Builder generateSecret(java.lang.Boolean generateSecret)
Default: false
generateSecret
- Whether to generate a client secret. This parameter is required.this
public UserPoolClient.Builder idTokenValidity(Duration idTokenValidity)
Values between 5 minutes and 1 day are valid. The duration can not be longer than the refresh token validity.
Default: Duration.minutes(60)
idTokenValidity
- Validity of the ID token. This parameter is required.this
public UserPoolClient.Builder oAuth(OAuthSettings oAuth)
An error is thrown when this is specified and disableOAuth
is set.
Default: - see defaults in `OAuthSettings`. meaningless if `disableOAuth` is set.
oAuth
- OAuth settings for this client to interact with the app. This parameter is required.this
public UserPoolClient.Builder preventUserExistenceErrors(java.lang.Boolean preventUserExistenceErrors)
Default: false
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 parameter is required.this
public UserPoolClient.Builder readAttributes(ClientAttributes readAttributes)
Default: - all standard and custom attributes
readAttributes
- The set of attributes this client will be able to read. This parameter is required.this
public UserPoolClient.Builder refreshTokenValidity(Duration refreshTokenValidity)
Values between 60 minutes and 10 years are valid.
Default: Duration.days(30)
refreshTokenValidity
- Validity of the refresh token. This parameter is required.this
public UserPoolClient.Builder supportedIdentityProviders(java.util.List<? extends UserPoolClientIdentityProvider> supportedIdentityProviders)
Default: - supports all identity providers that are registered with the user pool. If the user pool and/or identity providers are imported, either specify this option explicitly or ensure that the identity providers are registered with the user pool using the `UserPool.registerIdentityProvider()` API.
supportedIdentityProviders
- The list of identity providers that users should be able to use to sign in using this client. This parameter is required.this
public UserPoolClient.Builder userPoolClientName(java.lang.String userPoolClientName)
Default: - cloudformation generated name
userPoolClientName
- Name of the application client. This parameter is required.this
public UserPoolClient.Builder writeAttributes(ClientAttributes writeAttributes)
Default: - all standard and custom attributes
writeAttributes
- The set of attributes this client will be able to write. This parameter is required.this
public UserPoolClient.Builder userPool(IUserPool userPool)
userPool
- The UserPool resource this client will have access to. This parameter is required.this
public UserPoolClient build()