Table of Contents

Class UserPoolIdentityProviderOidcProps

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

Properties to initialize UserPoolIdentityProviderOidc.

public class UserPoolIdentityProviderOidcProps : IUserPoolIdentityProviderOidcProps, IUserPoolIdentityProviderProps
Inheritance
UserPoolIdentityProviderOidcProps
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK.AWS.Cognito;

            ProviderAttribute providerAttribute;
            UserPool userPool;

            var userPoolIdentityProviderOidcProps = new UserPoolIdentityProviderOidcProps {
                ClientId = "clientId",
                ClientSecret = "clientSecret",
                IssuerUrl = "issuerUrl",
                UserPool = userPool,

                // the properties below are optional
                AttributeMapping = new AttributeMapping {
                    Address = providerAttribute,
                    Birthdate = providerAttribute,
                    Custom = new Dictionary<string, ProviderAttribute> {
                        { "customKey", providerAttribute }
                    },
                    Email = providerAttribute,
                    FamilyName = providerAttribute,
                    Fullname = providerAttribute,
                    Gender = providerAttribute,
                    GivenName = providerAttribute,
                    LastUpdateTime = providerAttribute,
                    Locale = providerAttribute,
                    MiddleName = providerAttribute,
                    Nickname = providerAttribute,
                    PhoneNumber = providerAttribute,
                    PreferredUsername = providerAttribute,
                    ProfilePage = providerAttribute,
                    ProfilePicture = providerAttribute,
                    Timezone = providerAttribute,
                    Website = providerAttribute
                },
                AttributeRequestMethod = OidcAttributeRequestMethod.GET,
                Endpoints = new OidcEndpoints {
                    Authorization = "authorization",
                    JwksUri = "jwksUri",
                    Token = "token",
                    UserInfo = "userInfo"
                },
                Identifiers = new [] { "identifiers" },
                Name = "name",
                Scopes = new [] { "scopes" }
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

UserPoolIdentityProviderOidcProps()

public UserPoolIdentityProviderOidcProps()

Properties

AttributeMapping

Mapping attributes from the identity provider to standard and custom attributes of the user pool.

public IAttributeMapping? AttributeMapping { get; set; }

Property Value

IAttributeMapping

Remarks

Default: - no attribute mapping

AttributeRequestMethod

The method to use to request attributes.

public OidcAttributeRequestMethod? AttributeRequestMethod { get; set; }

Property Value

OidcAttributeRequestMethod?

Remarks

Default: OidcAttributeRequestMethod.GET

ClientId

The client id.

public string ClientId { get; set; }

Property Value

string

ClientSecret

The client secret.

public string ClientSecret { get; set; }

Property Value

string

Endpoints

OpenID connect endpoints.

public IOidcEndpoints? Endpoints { get; set; }

Property Value

IOidcEndpoints

Remarks

Default: - auto discovered with issuer URL

Identifiers

Identifiers.

public string[]? Identifiers { get; set; }

Property Value

string[]

Remarks

Identifiers can be used to redirect users to the correct IdP in multitenant apps.

Default: - no identifiers used

IssuerUrl

Issuer URL.

public string IssuerUrl { get; set; }

Property Value

string

Name

The name of the provider.

public string? Name { get; set; }

Property Value

string

Remarks

Default: - the unique ID of the construct

Scopes

The OAuth 2.0 scopes that you will request from OpenID Connect. Scopes are groups of OpenID Connect user attributes to exchange with your app.

public string[]? Scopes { get; set; }

Property Value

string[]

Remarks

Default: ['openid']

UserPool

The user pool to which this construct provides identities.

public IUserPool UserPool { get; set; }

Property Value

IUserPool