Class UserPoolDomain
Define a user pool domain.
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UserPoolDomain : Resource, IUserPoolDomain, IResource
Syntax (vb)
Public Class UserPoolDomain
Inherits Resource
Implements IUserPoolDomain, IResource
Remarks
ExampleMetadata: infused
Examples
var userpool = new UserPool(this, "UserPool", new UserPoolProps { });
var client = userpool.AddClient("Client", new UserPoolClientOptions {
// ...
OAuth = new OAuthSettings {
Flows = new OAuthFlows {
ImplicitCodeGrant = true
},
CallbackUrls = new [] { "https://myapp.com/home", "https://myapp.com/users" }
}
});
var domain = userpool.AddDomain("Domain", new UserPoolDomainOptions { });
var signInUrl = domain.SignInUrl(client, new SignInUrlOptions {
RedirectUri = "https://myapp.com/home"
});
Synopsis
Constructors
UserPoolDomain(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
UserPoolDomain(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
UserPoolDomain(Construct, String, IUserPoolDomainProps) |
Properties
CloudFrontDomainName | The domain name of the CloudFront distribution associated with the user pool domain. |
DomainName | The domain that was specified to be created. |
Methods
BaseUrl(IBaseUrlOptions) | The URL to the hosted UI associated with this domain. |
FromDomainName(Construct, String, String) | Import a UserPoolDomain given its domain name. |
SignInUrl(UserPoolClient, ISignInUrlOptions) | The URL to the sign in page in this domain using a specific UserPoolClient. |
Constructors
UserPoolDomain(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected UserPoolDomain(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
UserPoolDomain(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected UserPoolDomain(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
UserPoolDomain(Construct, String, IUserPoolDomainProps)
public UserPoolDomain(Construct scope, string id, IUserPoolDomainProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IUserPoolDomainProps
Properties
CloudFrontDomainName
The domain name of the CloudFront distribution associated with the user pool domain.
public virtual string CloudFrontDomainName { get; }
Property Value
System.String
DomainName
The domain that was specified to be created.
public virtual string DomainName { get; }
Property Value
System.String
Remarks
If customDomain
was selected, this holds the full domain name that was specified.
If the cognitoDomain
was used, it contains the prefix to the Cognito hosted domain.
Methods
BaseUrl(IBaseUrlOptions)
The URL to the hosted UI associated with this domain.
public virtual string BaseUrl(IBaseUrlOptions options = null)
Parameters
- options IBaseUrlOptions
options to customize baseUrl.
Returns
System.String
FromDomainName(Construct, String, String)
Import a UserPoolDomain given its domain name.
public static IUserPoolDomain FromDomainName(Construct scope, string id, string userPoolDomainName)
Parameters
- scope Constructs.Construct
- id System.String
- userPoolDomainName System.String
Returns
SignInUrl(UserPoolClient, ISignInUrlOptions)
The URL to the sign in page in this domain using a specific UserPoolClient.
public virtual string SignInUrl(UserPoolClient client, ISignInUrlOptions options)
Parameters
- client UserPoolClient
[disable-awslint:ref-via-interface] the user pool client that the UI will use to interact with the UserPool.
- options ISignInUrlOptions
options to customize signInUrl.
Returns
System.String