Class UserPoolClient

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cognito.UserPoolClient
All Implemented Interfaces:
IResource, IUserPoolClient, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:59.179Z") @Stability(Stable) public class UserPoolClient extends Resource implements IUserPoolClient
Define a UserPool App Client.

Example:

 UserPool pool = new UserPool(this, "Pool");
 UserPoolIdentityProviderAmazon provider = UserPoolIdentityProviderAmazon.Builder.create(this, "Amazon")
         .userPool(pool)
         .clientId("amzn-client-id")
         .clientSecret("amzn-client-secret")
         .build();
 UserPoolClient client = pool.addClient("app-client", UserPoolClientOptions.builder()
         // ...
         .supportedIdentityProviders(List.of(UserPoolClientIdentityProvider.AMAZON))
         .build());
 client.node.addDependency(provider);
 
  • Constructor Details

    • UserPoolClient

      protected UserPoolClient(software.amazon.jsii.JsiiObjectRef objRef)
    • UserPoolClient

      protected UserPoolClient(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • UserPoolClient

      @Stability(Stable) public UserPoolClient(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserPoolClientProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromUserPoolClientId

      @Stability(Stable) @NotNull public static IUserPoolClient fromUserPoolClientId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolClientId)
      Import a user pool client given its id.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      userPoolClientId - This parameter is required.
    • getOAuthFlows

      @Stability(Stable) @NotNull public OAuthFlows getOAuthFlows()
      The OAuth flows enabled for this client.
    • getUserPoolClientId

      @Stability(Stable) @NotNull public String getUserPoolClientId()
      Name of the application client.
      Specified by:
      getUserPoolClientId in interface IUserPoolClient
    • getUserPoolClientName

      @Stability(Stable) @NotNull public String getUserPoolClientName()
      The client name that was specified via the userPoolClientName property during initialization, throws an error otherwise.
    • getUserPoolClientSecret

      @Stability(Stable) @NotNull public SecretValue getUserPoolClientSecret()
      The generated client secret.

      Only available if the "generateSecret" props is set to true

      Specified by:
      getUserPoolClientSecret in interface IUserPoolClient