Show / Hide Table of Contents

Class OAuthFlows

Types of OAuth grant flows.

Inheritance
object
OAuthFlows
Implements
IOAuthFlows
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OAuthFlows : IOAuthFlows
Syntax (vb)
Public Class OAuthFlows Implements IOAuthFlows
Remarks

See: - the 'Allowed OAuth Flows' section at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html

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

OAuthFlows()

Types of OAuth grant flows.

Properties

AuthorizationCodeGrant

Initiate an authorization code grant flow, which provides an authorization code as the response.

ClientCredentials

Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.

ImplicitCodeGrant

The client should get the access token and ID token directly.

Constructors

OAuthFlows()

Types of OAuth grant flows.

public OAuthFlows()
Remarks

See: - the 'Allowed OAuth Flows' section at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html

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"
             });

Properties

AuthorizationCodeGrant

Initiate an authorization code grant flow, which provides an authorization code as the response.

public bool? AuthorizationCodeGrant { get; set; }
Property Value

bool?

Remarks

Default: false

ClientCredentials

Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.

public bool? ClientCredentials { get; set; }
Property Value

bool?

Remarks

Default: false

ImplicitCodeGrant

The client should get the access token and ID token directly.

public bool? ImplicitCodeGrant { get; set; }
Property Value

bool?

Remarks

Default: false

Implements

IOAuthFlows
Back to top Generated by DocFX