Interface UserPoolClientOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
UserPoolClientProps
- All Known Implementing Classes:
UserPoolClientOptions.Jsii$Proxy,UserPoolClientProps.Jsii$Proxy
Example:
UserPool pool = new UserPool(this, "Pool");
pool.addClient("app-client", UserPoolClientOptions.builder()
.oAuth(OAuthSettings.builder()
.flows(OAuthFlows.builder()
.authorizationCodeGrant(true)
.build())
.scopes(List.of(OAuthScope.OPENID))
.callbackUrls(List.of("https://my-app-domain.com/welcome"))
.logoutUrls(List.of("https://my-app-domain.com/signin"))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forUserPoolClientOptionsstatic final classAn implementation forUserPoolClientOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default DurationValidity of the access token.default AuthFlowThe set of OAuth authentication flows to enable on the client.default BooleanTurns off all OAuth interactions for this client.default BooleanEnable token revocation for this client.default BooleanWhether to generate a client secret.default DurationValidity of the ID token.default OAuthSettingsgetOAuth()OAuth settings for this client to interact with the app.default BooleanWhether 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.default ClientAttributesThe set of attributes this client will be able to read.default DurationValidity of the refresh token.default List<UserPoolClientIdentityProvider>The list of identity providers that users should be able to use to sign in using this client.default StringName of the application client.default ClientAttributesThe set of attributes this client will be able to write.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccessTokenValidity
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.
Default: Duration.minutes(60)
-
getAuthFlows
The set of OAuth authentication flows to enable on the client.Default: - all auth flows disabled
-
getDisableOAuth
Turns off all OAuth interactions for this client.Default: false
-
getEnableTokenRevocation
Enable token revocation for this client.Default: true for new user pool clients
-
getGenerateSecret
Whether to generate a client secret.Default: false
-
getIdTokenValidity
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.
Default: Duration.minutes(60)
-
getOAuth
OAuth settings for this client to interact with the app.An error is thrown when this is specified and
disableOAuthis set.Default: - see defaults in `OAuthSettings`. meaningless if `disableOAuth` is set.
-
getPreventUserExistenceErrors
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.Default: false
-
getReadAttributes
The set of attributes this client will be able to read.Default: - all standard and custom attributes
-
getRefreshTokenValidity
Validity of the refresh token.Values between 60 minutes and 10 years are valid.
Default: Duration.days(30)
-
getSupportedIdentityProviders
@Stability(Stable) @Nullable default List<UserPoolClientIdentityProvider> getSupportedIdentityProviders()The list of identity providers that users should be able to use to sign in using this client.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.
-
getUserPoolClientName
Name of the application client.Default: - cloudformation generated name
-
getWriteAttributes
The set of attributes this client will be able to write.Default: - all standard and custom attributes
-
builder
- Returns:
- a
UserPoolClientOptions.BuilderofUserPoolClientOptions
-