UserPoolIdentityProviderOidcProps Struct
Properties to initialize UserPoolIdentityProviderOidc.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
declare const providerAttribute: cognito.ProviderAttribute;
declare const userPool: cognito.UserPool;
const userPoolIdentityProviderOidcProps: cognito.UserPoolIdentityProviderOidcProps = {
clientId: 'clientId',
clientSecret: 'clientSecret',
issuerUrl: 'issuerUrl',
userPool: userPool,
// the properties below are optional
attributeMapping: {
address: providerAttribute,
birthdate: providerAttribute,
custom: {
customKey: providerAttribute,
},
email: providerAttribute,
emailVerified: 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: cognito.OidcAttributeRequestMethod.GET,
endpoints: {
authorization: 'authorization',
jwksUri: 'jwksUri',
token: 'token',
userInfo: 'userInfo',
},
identifiers: ['identifiers'],
name: 'name',
scopes: ['scopes'],
};
Properties
attributeMappingoptionalAttributeMappingattribute_mappingoptionalAttributeMappingattributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMapping#Mapping attributes from the identity provider to standard and custom attributes of the user pool.
Default: no attribute mapping
attributeRequestMethodoptionalOidcAttributeRequestMethodattribute_request_methodoptionalOidcAttributeRequestMethodattributeRequestMethodoptionalOidcAttributeRequestMethodAttributeRequestMethodoptionalOidcAttributeRequestMethodAttributeRequestMethodoptionalOidcAttributeRequestMethod= OidcAttributeRequestMethod.GET#The method to use to request attributes.
The client id.
The client secret.
endpointsoptionalOidcEndpointsendpointsoptionalOidcEndpointsendpointsoptionalOidcEndpointsEndpointsoptionalOidcEndpointsEndpointsoptionalOidcEndpoints#OpenID connect endpoints.
Default: auto discovered with issuer URL
identifiersoptionalstring[]identifiersoptionaltyping.List[str]identifiersoptionalList<String>Identifiersoptionalstring[]Identifiersoptional*[]*string#Identifiers.
Default: no identifiers used
Identifiers can be used to redirect users to the correct IdP in multitenant apps.
Issuer URL.
The name of the provider.
Default: the unique ID of the construct
scopesoptionalstring[]scopesoptionaltyping.List[str]scopesoptionalList<String>Scopesoptionalstring[]Scopesoptional*[]*string= ['openid']#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.