UserPoolIdentityProviderGoogleProps Struct
Properties to initialize UserPoolGoogleIdentityProvider.
| Source | aws-cognito/lib/user-pool-idps/google.ts |
|---|---|
| Type last changed |
Example
ts
const userpool = new cognito.UserPool(this, 'Pool');
const secret = secretsmanager.Secret.fromSecretAttributes(this, "CognitoClientSecret", {
secretCompleteArn: "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).secretValue
const provider = new cognito.UserPoolIdentityProviderGoogle(this, 'Google', {
clientId: 'amzn-client-id',
clientSecretValue: secret,
userPool: userpool,
});
python
userpool = cognito.UserPool(self, "Pool")
secret = secretsmanager.Secret.from_secret_attributes(self, "CognitoClientSecret",
secret_complete_arn="arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
).secret_value
provider = cognito.UserPoolIdentityProviderGoogle(self, "Google",
client_id="amzn-client-id",
client_secret_value=secret,
user_pool=userpool
)
java
UserPool userpool = new UserPool(this, "Pool");
SecretValue secret = Secret.fromSecretAttributes(this, "CognitoClientSecret", SecretAttributes.builder()
.secretCompleteArn("arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx")
.build()).getSecretValue();
UserPoolIdentityProviderGoogle provider = UserPoolIdentityProviderGoogle.Builder.create(this, "Google")
.clientId("amzn-client-id")
.clientSecretValue(secret)
.userPool(userpool)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var userpool = new UserPool(this, "Pool");
var secret = Secret.FromSecretAttributes(this, "CognitoClientSecret", new SecretAttributes {
SecretCompleteArn = "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).SecretValue;
var provider = new UserPoolIdentityProviderGoogle(this, "Google", new UserPoolIdentityProviderGoogleProps {
ClientId = "amzn-client-id",
ClientSecretValue = secret,
UserPool = userpool
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
userpool := cognito.NewUserPool(this, jsii.String("Pool"))
secret := secretsmanager.Secret_FromSecretAttributes(this, jsii.String("CognitoClientSecret"), &SecretAttributes{
SecretCompleteArn: jsii.String("arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"),
}).SecretValue
provider := cognito.NewUserPoolIdentityProviderGoogle(this, jsii.String("Google"), &UserPoolIdentityProviderGoogleProps{
ClientId: jsii.String("amzn-client-id"),
ClientSecretValue: secret,
UserPool: userpool,
})
Properties
attributeMappingoptionalAttributeMappingattribute_mappingoptionalAttributeMappingattributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMapping #Mapping attributes from the identity provider to standard and custom attributes of the user pool.
Default: no attribute mapping
The client id recognized by Google APIs.
clientSecretoptionalstringclient_secretoptionalstrclientSecretoptionalStringClientSecretoptionalstringClientSecretoptional*string = none deprecated #use clientSecretValue instead
clientSecretValueoptionalSecretValueclient_secret_valueoptionalSecretValueclientSecretValueoptionalSecretValueClientSecretValueoptionalSecretValueClientSecretValueoptionalSecretValue = none #The client secret to be accompanied with clientId for Google APIs to authenticate the client as SecretValue.
scopesoptionalstring[]scopesoptionaltyping.List[str]scopesoptionalList<String>Scopesoptionalstring[]Scopesoptional*[]*string #The list of Google permissions to obtain for getting access to the Google profile.
Default: [ profile ]