aws-cdk-lib.aws_cognito.ProviderAttribute

class ProviderAttribute

LanguageType name
.NETAmazon.CDK.AWS.Cognito.ProviderAttribute
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#ProviderAttribute
Javasoftware.amazon.awscdk.services.cognito.ProviderAttribute
Pythonaws_cdk.aws_cognito.ProviderAttribute
TypeScript (source)aws-cdk-lib » aws_cognito » ProviderAttribute

An attribute available from a third party identity provider.

Example

const userpool = new cognito.UserPool(this, 'Pool');

new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', {
  clientId: 'amzn-client-id',
  clientSecret: 'amzn-client-secret',
  userPool: userpool,
  attributeMapping: {
    email: cognito.ProviderAttribute.AMAZON_EMAIL,
    website: cognito.ProviderAttribute.other('url'), // use other() when an attribute is not pre-defined in the CDK
    custom: {
      // custom user pool attributes go here
      uniqueId: cognito.ProviderAttribute.AMAZON_USER_ID,
    },
  },
});

Properties

NameTypeDescription
attributeNamestringThe attribute value string as recognized by the provider.
static AMAZON_EMAILProviderAttributeThe email attribute provided by Amazon.
static AMAZON_NAMEProviderAttributeThe name attribute provided by Amazon.
static AMAZON_POSTAL_CODEProviderAttributeThe postal code attribute provided by Amazon.
static AMAZON_USER_IDProviderAttributeThe user id attribute provided by Amazon.
static APPLE_EMAILProviderAttributeThe email attribute provided by Apple.
static APPLE_FIRST_NAMEProviderAttributeThe first name attribute provided by Apple.
static APPLE_LAST_NAMEProviderAttributeThe last name attribute provided by Apple.
static APPLE_NAMEProviderAttributeThe name attribute provided by Apple.
static FACEBOOK_BIRTHDAYProviderAttributeThe birthday attribute provided by Facebook.
static FACEBOOK_EMAILProviderAttributeThe email attribute provided by Facebook.
static FACEBOOK_FIRST_NAMEProviderAttributeThe first name attribute provided by Facebook.
static FACEBOOK_GENDERProviderAttributeThe gender attribute provided by Facebook.
static FACEBOOK_IDProviderAttributeThe user id attribute provided by Facebook.
static FACEBOOK_LAST_NAMEProviderAttributeThe last name attribute provided by Facebook.
static FACEBOOK_LOCALEProviderAttributeThe locale attribute provided by Facebook.
static FACEBOOK_MIDDLE_NAMEProviderAttributeThe middle name attribute provided by Facebook.
static FACEBOOK_NAMEProviderAttributeThe name attribute provided by Facebook.
static GOOGLE_BIRTHDAYSProviderAttributeThe birthday attribute provided by Google.
static GOOGLE_EMAILProviderAttributeThe email attribute provided by Google.
static GOOGLE_FAMILY_NAMEProviderAttributeThe family name attribute provided by Google.
static GOOGLE_GENDERProviderAttributeThe gender attribute provided by Google.
static GOOGLE_GIVEN_NAMEProviderAttributeThe given name attribute provided by Google.
static GOOGLE_NAMEProviderAttributeThe name attribute provided by Google.
static GOOGLE_NAMESProviderAttributeThe name attribute provided by Google.
static GOOGLE_PHONE_NUMBERSProviderAttributeThe phone number attribute provided by Google.
static GOOGLE_PICTUREProviderAttributeThe picture attribute provided by Google.

attributeName

Type: string

The attribute value string as recognized by the provider.


static AMAZON_EMAIL

Type: ProviderAttribute

The email attribute provided by Amazon.


static AMAZON_NAME

Type: ProviderAttribute

The name attribute provided by Amazon.


static AMAZON_POSTAL_CODE

Type: ProviderAttribute

The postal code attribute provided by Amazon.


static AMAZON_USER_ID

Type: ProviderAttribute

The user id attribute provided by Amazon.


static APPLE_EMAIL

Type: ProviderAttribute

The email attribute provided by Apple.


static APPLE_FIRST_NAME

Type: ProviderAttribute

The first name attribute provided by Apple.


static APPLE_LAST_NAME

Type: ProviderAttribute

The last name attribute provided by Apple.


static APPLE_NAME

Type: ProviderAttribute

The name attribute provided by Apple.


static FACEBOOK_BIRTHDAY

Type: ProviderAttribute

The birthday attribute provided by Facebook.


static FACEBOOK_EMAIL

Type: ProviderAttribute

The email attribute provided by Facebook.


static FACEBOOK_FIRST_NAME

Type: ProviderAttribute

The first name attribute provided by Facebook.


static FACEBOOK_GENDER

Type: ProviderAttribute

The gender attribute provided by Facebook.


static FACEBOOK_ID

Type: ProviderAttribute

The user id attribute provided by Facebook.


static FACEBOOK_LAST_NAME

Type: ProviderAttribute

The last name attribute provided by Facebook.


static FACEBOOK_LOCALE

Type: ProviderAttribute

The locale attribute provided by Facebook.


static FACEBOOK_MIDDLE_NAME

Type: ProviderAttribute

The middle name attribute provided by Facebook.


static FACEBOOK_NAME

Type: ProviderAttribute

The name attribute provided by Facebook.


static GOOGLE_BIRTHDAYS

Type: ProviderAttribute

The birthday attribute provided by Google.


static GOOGLE_EMAIL

Type: ProviderAttribute

The email attribute provided by Google.


static GOOGLE_FAMILY_NAME

Type: ProviderAttribute

The family name attribute provided by Google.


static GOOGLE_GENDER

Type: ProviderAttribute

The gender attribute provided by Google.


static GOOGLE_GIVEN_NAME

Type: ProviderAttribute

The given name attribute provided by Google.


static GOOGLE_NAME

Type: ProviderAttribute

The name attribute provided by Google.


static GOOGLE_NAMES

Type: ProviderAttribute

The name attribute provided by Google.


static GOOGLE_PHONE_NUMBERS

Type: ProviderAttribute

The phone number attribute provided by Google.


static GOOGLE_PICTURE

Type: ProviderAttribute

The picture attribute provided by Google.

Methods

NameDescription
static other(attributeName)Use this to specify an attribute from the identity provider that is not pre-defined in the CDK.

static other(attributeName)

public static other(attributeName: string): ProviderAttribute

Parameters

  • attributeName string — the attribute value string as recognized by the provider.

Returns

  • ProviderAttribute

Use this to specify an attribute from the identity provider that is not pre-defined in the CDK.