Class UserPoolClient
Define a UserPool App Client.
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UserPoolClient : Resource, IUserPoolClient, IResource, IConstruct, IDependable
Syntax (vb)
Public Class UserPoolClient Inherits Resource Implements IUserPoolClient, IResource, IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
var pool = new UserPool(this, "Pool");
var provider = new UserPoolIdentityProviderAmazon(this, "Amazon", new UserPoolIdentityProviderAmazonProps {
UserPool = pool,
ClientId = "amzn-client-id",
ClientSecret = "amzn-client-secret"
});
var client = pool.AddClient("app-client", new UserPoolClientOptions {
// ...
SupportedIdentityProviders = new [] { UserPoolClientIdentityProvider.AMAZON }
});
client.Node.AddDependency(provider);
Synopsis
Constructors
UserPoolClient(Construct, string, IUserPoolClientProps) | Define a UserPool App Client. |
Properties
OAuthFlows | The OAuth flows enabled for this client. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
UserPoolClientId | Name of the application client. |
UserPoolClientName | The client name that was specified via the |
UserPoolClientSecret | The generated client secret. |
Methods
FromUserPoolClientId(Construct, string, string) | Import a user pool client given its id. |
Constructors
UserPoolClient(Construct, string, IUserPoolClientProps)
Define a UserPool App Client.
public UserPoolClient(Construct scope, string id, IUserPoolClientProps props)
Parameters
- scope Construct
- id string
- props IUserPoolClientProps
Remarks
ExampleMetadata: infused
Examples
var pool = new UserPool(this, "Pool");
var provider = new UserPoolIdentityProviderAmazon(this, "Amazon", new UserPoolIdentityProviderAmazonProps {
UserPool = pool,
ClientId = "amzn-client-id",
ClientSecret = "amzn-client-secret"
});
var client = pool.AddClient("app-client", new UserPoolClientOptions {
// ...
SupportedIdentityProviders = new [] { UserPoolClientIdentityProvider.AMAZON }
});
client.Node.AddDependency(provider);
Properties
OAuthFlows
The OAuth flows enabled for this client.
public virtual IOAuthFlows OAuthFlows { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
UserPoolClientId
Name of the application client.
public virtual string UserPoolClientId { get; }
Property Value
Remarks
ExampleMetadata: infused
UserPoolClientName
The client name that was specified via the userPoolClientName
property during initialization, throws an error otherwise.
public virtual string UserPoolClientName { get; }
Property Value
Remarks
ExampleMetadata: infused
UserPoolClientSecret
The generated client secret.
public virtual SecretValue UserPoolClientSecret { get; }
Property Value
Remarks
Only available if the "generateSecret" props is set to true
Methods
FromUserPoolClientId(Construct, string, string)
Import a user pool client given its id.
public static IUserPoolClient FromUserPoolClientId(Construct scope, string id, string userPoolClientId)
Parameters
Returns
Remarks
ExampleMetadata: infused