Documentation
¶
Overview ¶
The CDK Construct Library for AWS::Cognito Identity Pools
Index ¶
- func IdentityPool_IsConstruct(x interface{}) *bool
- func IdentityPool_IsOwnedResource(construct constructs.IConstruct) *bool
- func IdentityPool_IsResource(construct constructs.IConstruct) *bool
- func NewIdentityPoolProviderUrl_Override(i IdentityPoolProviderUrl, type_ IdentityPoolProviderType, value *string)
- func NewIdentityPool_Override(i IdentityPool, scope constructs.Construct, id *string, ...)
- func NewUserPoolAuthenticationProvider_Override(u UserPoolAuthenticationProvider, props *UserPoolAuthenticationProviderProps)
- type IIdentityPool
- type IUserPoolAuthenticationProvider
- type IdentityPool
- type IdentityPoolAmazonLoginProvider
- type IdentityPoolAppleLoginProvider
- type IdentityPoolAuthenticationProviders
- type IdentityPoolFacebookLoginProvider
- type IdentityPoolGoogleLoginProvider
- type IdentityPoolProps
- type IdentityPoolProviderType
- type IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_AMAZON() IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_APPLE() IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_Custom(url *string) IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_FACEBOOK() IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_GOOGLE() IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_OpenId(url *string) IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_Saml(url *string) IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_TWITTER() IdentityPoolProviderUrl
- func IdentityPoolProviderUrl_UserPool(userPool awscognito.IUserPool, userPoolClient awscognito.IUserPoolClient) IdentityPoolProviderUrl
- func NewIdentityPoolProviderUrl(type_ IdentityPoolProviderType, value *string) IdentityPoolProviderUrl
- type IdentityPoolRoleMapping
- type IdentityPoolTwitterLoginProvider
- type RoleMappingMatchType
- type RoleMappingRule
- type UserPoolAuthenticationProvider
- type UserPoolAuthenticationProviderBindConfig
- type UserPoolAuthenticationProviderBindOptions
- type UserPoolAuthenticationProviderProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentityPool_IsConstruct ¶
func IdentityPool_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func IdentityPool_IsOwnedResource ¶
func IdentityPool_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func IdentityPool_IsResource ¶
func IdentityPool_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func NewIdentityPoolProviderUrl_Override ¶
func NewIdentityPoolProviderUrl_Override(i IdentityPoolProviderUrl, type_ IdentityPoolProviderType, value *string)
Experimental.
func NewIdentityPool_Override ¶
func NewIdentityPool_Override(i IdentityPool, scope constructs.Construct, id *string, props *IdentityPoolProps)
Experimental.
func NewUserPoolAuthenticationProvider_Override ¶
func NewUserPoolAuthenticationProvider_Override(u UserPoolAuthenticationProvider, props *UserPoolAuthenticationProviderProps)
Experimental.
Types ¶
type IIdentityPool ¶
type IIdentityPool interface { awscdk.IResource // The ARN of the Identity Pool. // Experimental. IdentityPoolArn() *string // The ID of the Identity Pool in the format REGION:GUID. // Experimental. IdentityPoolId() *string // Name of the Identity Pool. // Experimental. IdentityPoolName() *string }
Represents a Cognito Identity Pool. Experimental.
func IdentityPool_FromIdentityPoolArn ¶
func IdentityPool_FromIdentityPoolArn(scope constructs.Construct, id *string, identityPoolArn *string) IIdentityPool
Import an existing Identity Pool from its ARN. Experimental.
func IdentityPool_FromIdentityPoolId ¶
func IdentityPool_FromIdentityPoolId(scope constructs.Construct, id *string, identityPoolId *string) IIdentityPool
Import an existing Identity Pool from its ID. Experimental.
type IUserPoolAuthenticationProvider ¶
type IUserPoolAuthenticationProvider interface { // The method called when a given User Pool Authentication Provider is added (for the first time) to an Identity Pool. // Experimental. Bind(scope constructs.Construct, identityPool IIdentityPool, options *UserPoolAuthenticationProviderBindOptions) *UserPoolAuthenticationProviderBindConfig }
Represents the concept of a User Pool Authentication Provider.
You use user pool authentication providers to configure User Pools and User Pool Clients for use with Identity Pools. Experimental.
type IdentityPool ¶
type IdentityPool interface { awscdk.Resource IIdentityPool // Default Role for authenticated users. // Experimental. AuthenticatedRole() awsiam.IRole // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the Identity Pool. // Experimental. IdentityPoolArn() *string // The ID of the Identity Pool in the format REGION:GUID. // Experimental. IdentityPoolId() *string // The name of the Identity Pool. // Experimental. IdentityPoolName() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Default Role for unauthenticated users. // Experimental. UnauthenticatedRole() awsiam.IRole // Add a User Pool to the Identity Pool and configure the User Pool client to handle identities. // Experimental. AddUserPoolAuthentication(userPool IUserPoolAuthenticationProvider) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Define a Cognito Identity Pool.
Example:
var openIdConnectProvider openIdConnectProvider awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, OpenIdConnectProviders: []iOpenIdConnectProvider{ openIdConnectProvider, }, CustomProvider: jsii.String("my-custom-provider.example.com"), }, })
Experimental.
func NewIdentityPool ¶
func NewIdentityPool(scope constructs.Construct, id *string, props *IdentityPoolProps) IdentityPool
Experimental.
type IdentityPoolAmazonLoginProvider ¶
type IdentityPoolAmazonLoginProvider struct { // App ID for Amazon identity federation. // Experimental. AppId *string `field:"required" json:"appId" yaml:"appId"` }
Login Provider for identity federation using Amazon credentials.
Example:
awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Amazon: &IdentityPoolAmazonLoginProvider{ AppId: jsii.String("amzn1.application.12312k3j234j13rjiwuenf"), }, Facebook: &IdentityPoolFacebookLoginProvider{ AppId: jsii.String("1234567890123"), }, Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, Apple: &IdentityPoolAppleLoginProvider{ ServicesId: jsii.String("com.myappleapp.auth"), }, Twitter: &IdentityPoolTwitterLoginProvider{ ConsumerKey: jsii.String("my-twitter-id"), ConsumerSecret: jsii.String("my-twitter-secret"), }, }, })
Experimental.
type IdentityPoolAppleLoginProvider ¶
type IdentityPoolAppleLoginProvider struct { // Services ID for Apple identity federation. // Experimental. ServicesId *string `field:"required" json:"servicesId" yaml:"servicesId"` }
Login Provider for identity federation using Apple credentials.
Example:
awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Amazon: &IdentityPoolAmazonLoginProvider{ AppId: jsii.String("amzn1.application.12312k3j234j13rjiwuenf"), }, Facebook: &IdentityPoolFacebookLoginProvider{ AppId: jsii.String("1234567890123"), }, Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, Apple: &IdentityPoolAppleLoginProvider{ ServicesId: jsii.String("com.myappleapp.auth"), }, Twitter: &IdentityPoolTwitterLoginProvider{ ConsumerKey: jsii.String("my-twitter-id"), ConsumerSecret: jsii.String("my-twitter-secret"), }, }, })
Experimental.
type IdentityPoolAuthenticationProviders ¶
type IdentityPoolAuthenticationProviders struct { // The Amazon Authentication Provider associated with this Identity Pool. // Default: - No Amazon Authentication Provider used without OpenIdConnect or a User Pool. // // Experimental. Amazon *IdentityPoolAmazonLoginProvider `field:"optional" json:"amazon" yaml:"amazon"` // The Apple Authentication Provider associated with this Identity Pool. // Default: - No Apple Authentication Provider used without OpenIdConnect or a User Pool. // // Experimental. Apple *IdentityPoolAppleLoginProvider `field:"optional" json:"apple" yaml:"apple"` // The developer provider name to associate with this Identity Pool. // Default: - no custom provider. // // Experimental. CustomProvider *string `field:"optional" json:"customProvider" yaml:"customProvider"` // The Facebook Authentication Provider associated with this Identity Pool. // Default: - No Facebook Authentication Provider used without OpenIdConnect or a User Pool. // // Experimental. Facebook *IdentityPoolFacebookLoginProvider `field:"optional" json:"facebook" yaml:"facebook"` // The Google Authentication Provider associated with this Identity Pool. // Default: - No Google Authentication Provider used without OpenIdConnect or a User Pool. // // Experimental. Google *IdentityPoolGoogleLoginProvider `field:"optional" json:"google" yaml:"google"` // The OpenIdConnect Provider associated with this Identity Pool. // Default: - no OpenIdConnectProvider. // // Experimental. OpenIdConnectProviders *[]awsiam.IOpenIdConnectProvider `field:"optional" json:"openIdConnectProviders" yaml:"openIdConnectProviders"` // The Security Assertion Markup Language provider associated with this Identity Pool. // Default: - no SamlProvider. // // Experimental. SamlProviders *[]awsiam.ISamlProvider `field:"optional" json:"samlProviders" yaml:"samlProviders"` // The Twitter Authentication Provider associated with this Identity Pool. // Default: - No Twitter Authentication Provider used without OpenIdConnect or a User Pool. // // Experimental. Twitter *IdentityPoolTwitterLoginProvider `field:"optional" json:"twitter" yaml:"twitter"` // The User Pool Authentication Providers associated with this Identity Pool. // Default: - no User Pools associated. // // Experimental. UserPools *[]IUserPoolAuthenticationProvider `field:"optional" json:"userPools" yaml:"userPools"` }
External Authentication Providers for usage in Identity Pool.
Example:
var openIdConnectProvider openIdConnectProvider awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, OpenIdConnectProviders: []iOpenIdConnectProvider{ openIdConnectProvider, }, CustomProvider: jsii.String("my-custom-provider.example.com"), }, })
See: https://docs.aws.amazon.com/cognito/latest/developerguide/external-identity-providers.html
Experimental.
type IdentityPoolFacebookLoginProvider ¶
type IdentityPoolFacebookLoginProvider struct { // App ID for Facebook identity federation. // Experimental. AppId *string `field:"required" json:"appId" yaml:"appId"` }
Login Provider for identity federation using Facebook credentials.
Example:
awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Amazon: &IdentityPoolAmazonLoginProvider{ AppId: jsii.String("amzn1.application.12312k3j234j13rjiwuenf"), }, Facebook: &IdentityPoolFacebookLoginProvider{ AppId: jsii.String("1234567890123"), }, Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, Apple: &IdentityPoolAppleLoginProvider{ ServicesId: jsii.String("com.myappleapp.auth"), }, Twitter: &IdentityPoolTwitterLoginProvider{ ConsumerKey: jsii.String("my-twitter-id"), ConsumerSecret: jsii.String("my-twitter-secret"), }, }, })
Experimental.
type IdentityPoolGoogleLoginProvider ¶
type IdentityPoolGoogleLoginProvider struct { // Client ID for Google identity federation. // Experimental. ClientId *string `field:"required" json:"clientId" yaml:"clientId"` }
Login Provider for identity federation using Google credentials.
Example:
awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Amazon: &IdentityPoolAmazonLoginProvider{ AppId: jsii.String("amzn1.application.12312k3j234j13rjiwuenf"), }, Facebook: &IdentityPoolFacebookLoginProvider{ AppId: jsii.String("1234567890123"), }, Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, Apple: &IdentityPoolAppleLoginProvider{ ServicesId: jsii.String("com.myappleapp.auth"), }, Twitter: &IdentityPoolTwitterLoginProvider{ ConsumerKey: jsii.String("my-twitter-id"), ConsumerSecret: jsii.String("my-twitter-secret"), }, }, })
Experimental.
type IdentityPoolProps ¶
type IdentityPoolProps struct { // Enables the Basic (Classic) authentication flow. // Default: - Classic Flow not allowed. // // Experimental. AllowClassicFlow *bool `field:"optional" json:"allowClassicFlow" yaml:"allowClassicFlow"` // Whether the Identity Pool supports unauthenticated logins. // Default: - false. // // Experimental. AllowUnauthenticatedIdentities *bool `field:"optional" json:"allowUnauthenticatedIdentities" yaml:"allowUnauthenticatedIdentities"` // The default Role to be assumed by authenticated users. // Default: - A default authenticated Role will be added. // // Experimental. AuthenticatedRole awsiam.IRole `field:"optional" json:"authenticatedRole" yaml:"authenticatedRole"` // Authentication Providers for using in Identity Pool. // Default: - No Authentication Providers passed directly to Identity Pool. // // Experimental. AuthenticationProviders *IdentityPoolAuthenticationProviders `field:"optional" json:"authenticationProviders" yaml:"authenticationProviders"` // The name of the Identity Pool. // Default: - Automatically generated name by CloudFormation at deploy time. // // Experimental. IdentityPoolName *string `field:"optional" json:"identityPoolName" yaml:"identityPoolName"` // Rules for mapping roles to users. // Default: - no role mappings. // // Experimental. RoleMappings *[]*IdentityPoolRoleMapping `field:"optional" json:"roleMappings" yaml:"roleMappings"` // The default Role to be assumed by unauthenticated users. // Default: - A default unauthenticated Role will be added. // // Experimental. UnauthenticatedRole awsiam.IRole `field:"optional" json:"unauthenticatedRole" yaml:"unauthenticatedRole"` }
Props for the Identity Pool construct.
Example:
var openIdConnectProvider openIdConnectProvider awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, OpenIdConnectProviders: []iOpenIdConnectProvider{ openIdConnectProvider, }, CustomProvider: jsii.String("my-custom-provider.example.com"), }, })
Experimental.
type IdentityPoolProviderType ¶
type IdentityPoolProviderType string
Types of Identity Pool Login Providers. Experimental.
const ( // Facebook provider type. // Experimental. IdentityPoolProviderType_FACEBOOK IdentityPoolProviderType = "FACEBOOK" // Google provider type. // Experimental. IdentityPoolProviderType_GOOGLE IdentityPoolProviderType = "GOOGLE" // Amazon provider type. // Experimental. IdentityPoolProviderType_AMAZON IdentityPoolProviderType = "AMAZON" // Apple provider type. // Experimental. IdentityPoolProviderType_APPLE IdentityPoolProviderType = "APPLE" // Twitter provider type. // Experimental. IdentityPoolProviderType_TWITTER IdentityPoolProviderType = "TWITTER" // Open Id provider type. // Experimental. IdentityPoolProviderType_OPEN_ID IdentityPoolProviderType = "OPEN_ID" // Saml provider type. // Experimental. IdentityPoolProviderType_SAML IdentityPoolProviderType = "SAML" // User Pool provider type. // Experimental. IdentityPoolProviderType_USER_POOL IdentityPoolProviderType = "USER_POOL" // Custom provider type. // Experimental. IdentityPoolProviderType_CUSTOM IdentityPoolProviderType = "CUSTOM" )
type IdentityPoolProviderUrl ¶
type IdentityPoolProviderUrl interface { // The type of Identity Pool Provider. // Experimental. Type() IdentityPoolProviderType // The value of the Identity Pool Provider. // Experimental. Value() *string }
Keys for Login Providers - each correspond to the client IDs of their respective federation Identity Providers.
Example:
import "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), RoleMappings: []identityPoolRoleMapping{ &identityPoolRoleMapping{ ProviderUrl: awscdkcognitoidentitypoolalpha.IdentityPoolProviderUrl_Custom(jsii.String("my-custom-provider.com")), UseToken: jsii.Boolean(true), }, }, })
Experimental.
func IdentityPoolProviderUrl_AMAZON ¶
func IdentityPoolProviderUrl_AMAZON() IdentityPoolProviderUrl
func IdentityPoolProviderUrl_APPLE ¶
func IdentityPoolProviderUrl_APPLE() IdentityPoolProviderUrl
func IdentityPoolProviderUrl_Custom ¶
func IdentityPoolProviderUrl_Custom(url *string) IdentityPoolProviderUrl
Custom Provider url. Experimental.
func IdentityPoolProviderUrl_FACEBOOK ¶
func IdentityPoolProviderUrl_FACEBOOK() IdentityPoolProviderUrl
func IdentityPoolProviderUrl_GOOGLE ¶
func IdentityPoolProviderUrl_GOOGLE() IdentityPoolProviderUrl
func IdentityPoolProviderUrl_OpenId ¶
func IdentityPoolProviderUrl_OpenId(url *string) IdentityPoolProviderUrl
OpenId Provider url. Experimental.
func IdentityPoolProviderUrl_Saml ¶
func IdentityPoolProviderUrl_Saml(url *string) IdentityPoolProviderUrl
Saml Provider url. Experimental.
func IdentityPoolProviderUrl_TWITTER ¶
func IdentityPoolProviderUrl_TWITTER() IdentityPoolProviderUrl
func IdentityPoolProviderUrl_UserPool ¶
func IdentityPoolProviderUrl_UserPool(userPool awscognito.IUserPool, userPoolClient awscognito.IUserPoolClient) IdentityPoolProviderUrl
User Pool Provider Url. Experimental.
func NewIdentityPoolProviderUrl ¶
func NewIdentityPoolProviderUrl(type_ IdentityPoolProviderType, value *string) IdentityPoolProviderUrl
Experimental.
type IdentityPoolRoleMapping ¶
type IdentityPoolRoleMapping struct { // The url of the Provider for which the role is mapped. // Experimental. ProviderUrl IdentityPoolProviderUrl `field:"required" json:"providerUrl" yaml:"providerUrl"` // The key used for the role mapping in the role mapping hash. // // Required if the providerUrl is a token. // Default: - The provided providerUrl. // // Experimental. MappingKey *string `field:"optional" json:"mappingKey" yaml:"mappingKey"` // Allow for role assumption when results of role mapping are ambiguous. // Default: false - Ambiguous role resolutions will lead to requester being denied. // // Experimental. ResolveAmbiguousRoles *bool `field:"optional" json:"resolveAmbiguousRoles" yaml:"resolveAmbiguousRoles"` // The claim and value that must be matched in order to assume the role. // // Required if useToken is false. // Default: - No role mapping rule. // // Experimental. Rules *[]*RoleMappingRule `field:"optional" json:"rules" yaml:"rules"` // If true then mapped roles must be passed through the cognito:roles or cognito:preferred_role claims from Identity Provider. // See: https://docs.aws.amazon.com/cognito/latest/developerguide/role-based-access-control.html#using-tokens-to-assign-roles-to-users // // Default: false. // // Experimental. UseToken *bool `field:"optional" json:"useToken" yaml:"useToken"` }
Map roles to users in the Identity Pool based on claims from the Identity Provider.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cognito_identitypool_alpha "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" import "github.com/aws/aws-cdk-go/awscdk" var identityPoolProviderUrl identityPoolProviderUrl var role role identityPoolRoleMapping := &IdentityPoolRoleMapping{ ProviderUrl: identityPoolProviderUrl, // the properties below are optional MappingKey: jsii.String("mappingKey"), ResolveAmbiguousRoles: jsii.Boolean(false), Rules: []roleMappingRule{ &roleMappingRule{ Claim: jsii.String("claim"), ClaimValue: jsii.String("claimValue"), MappedRole: role, // the properties below are optional MatchType: cognito_identitypool_alpha.RoleMappingMatchType_EQUALS, }, }, UseToken: jsii.Boolean(false), }
Experimental.
type IdentityPoolTwitterLoginProvider ¶
type IdentityPoolTwitterLoginProvider struct { // Consumer key for Twitter identity federation. // Experimental. ConsumerKey *string `field:"required" json:"consumerKey" yaml:"consumerKey"` // Consumer secret for identity federation. // Experimental. ConsumerSecret *string `field:"required" json:"consumerSecret" yaml:"consumerSecret"` }
Login Provider for identity federation using Twitter credentials.
Example:
awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), AuthenticationProviders: &IdentityPoolAuthenticationProviders{ Amazon: &IdentityPoolAmazonLoginProvider{ AppId: jsii.String("amzn1.application.12312k3j234j13rjiwuenf"), }, Facebook: &IdentityPoolFacebookLoginProvider{ AppId: jsii.String("1234567890123"), }, Google: &IdentityPoolGoogleLoginProvider{ ClientId: jsii.String("12345678012.apps.googleusercontent.com"), }, Apple: &IdentityPoolAppleLoginProvider{ ServicesId: jsii.String("com.myappleapp.auth"), }, Twitter: &IdentityPoolTwitterLoginProvider{ ConsumerKey: jsii.String("my-twitter-id"), ConsumerSecret: jsii.String("my-twitter-secret"), }, }, })
Experimental.
type RoleMappingMatchType ¶
type RoleMappingMatchType string
Types of matches allowed for role mapping.
Example:
import "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" var adminRole role var nonAdminRole role awscdkcognitoidentitypoolalpha.NewIdentityPool(this, jsii.String("myidentitypool"), &IdentityPoolProps{ IdentityPoolName: jsii.String("myidentitypool"), // Assign specific roles to users based on whether or not the custom admin claim is passed from the identity provider RoleMappings: []identityPoolRoleMapping{ &identityPoolRoleMapping{ ProviderUrl: awscdkcognitoidentitypoolalpha.IdentityPoolProviderUrl_AMAZON(), Rules: []roleMappingRule{ &roleMappingRule{ Claim: jsii.String("custom:admin"), ClaimValue: jsii.String("admin"), MappedRole: adminRole, }, &roleMappingRule{ Claim: jsii.String("custom:admin"), ClaimValue: jsii.String("admin"), MatchType: awscdkcognitoidentitypoolalpha.RoleMappingMatchType_NOTEQUAL, MappedRole: nonAdminRole, }, }, }, }, })
Experimental.
const ( // The claim from the token must equal the given value in order for a match. // Experimental. RoleMappingMatchType_EQUALS RoleMappingMatchType = "EQUALS" // The claim from the token must contain the given value in order for a match. // Experimental. RoleMappingMatchType_CONTAINS RoleMappingMatchType = "CONTAINS" // The claim from the token must start with the given value in order for a match. // Experimental. RoleMappingMatchType_STARTS_WITH RoleMappingMatchType = "STARTS_WITH" // The claim from the token must not equal the given value in order for a match. // Experimental. RoleMappingMatchType_NOTEQUAL RoleMappingMatchType = "NOTEQUAL" )
type RoleMappingRule ¶
type RoleMappingRule struct { // The key sent in the token by the federated Identity Provider. // Experimental. Claim *string `field:"required" json:"claim" yaml:"claim"` // The value of the claim that must be matched. // Experimental. ClaimValue *string `field:"required" json:"claimValue" yaml:"claimValue"` // The role to be assumed when the claim value is matched. // Experimental. MappedRole awsiam.IRole `field:"required" json:"mappedRole" yaml:"mappedRole"` // How to match with the claim value. // Default: RoleMappingMatchType.EQUALS // // Experimental. MatchType RoleMappingMatchType `field:"optional" json:"matchType" yaml:"matchType"` }
Represents an Identity Pool Role Attachment role mapping rule.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cognito_identitypool_alpha "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" import "github.com/aws/aws-cdk-go/awscdk" var role role roleMappingRule := &RoleMappingRule{ Claim: jsii.String("claim"), ClaimValue: jsii.String("claimValue"), MappedRole: role, // the properties below are optional MatchType: cognito_identitypool_alpha.RoleMappingMatchType_EQUALS, }
Experimental.
type UserPoolAuthenticationProvider ¶
type UserPoolAuthenticationProvider interface { IUserPoolAuthenticationProvider // The method called when a given User Pool Authentication Provider is added (for the first time) to an Identity Pool. // Experimental. Bind(scope constructs.Construct, identityPool IIdentityPool, _options *UserPoolAuthenticationProviderBindOptions) *UserPoolAuthenticationProviderBindConfig }
Defines a User Pool Authentication Provider.
Example:
var identityPool identityPool userPool := cognito.NewUserPool(this, jsii.String("Pool")) identityPool.AddUserPoolAuthentication(awscdkcognitoidentitypoolalpha.NewUserPoolAuthenticationProvider(&UserPoolAuthenticationProviderProps{ UserPool: UserPool, DisableServerSideTokenCheck: jsii.Boolean(true), }))
Experimental.
func NewUserPoolAuthenticationProvider ¶
func NewUserPoolAuthenticationProvider(props *UserPoolAuthenticationProviderProps) UserPoolAuthenticationProvider
Experimental.
type UserPoolAuthenticationProviderBindConfig ¶
type UserPoolAuthenticationProviderBindConfig struct { // Client Id of the Associated User Pool Client. // Experimental. ClientId *string `field:"required" json:"clientId" yaml:"clientId"` // The identity providers associated with the UserPool. // Experimental. ProviderName *string `field:"required" json:"providerName" yaml:"providerName"` // Whether to enable the identity pool's server side token check. // Experimental. ServerSideTokenCheck *bool `field:"required" json:"serverSideTokenCheck" yaml:"serverSideTokenCheck"` }
Represents a UserPoolAuthenticationProvider Bind Configuration.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cognito_identitypool_alpha "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" userPoolAuthenticationProviderBindConfig := &UserPoolAuthenticationProviderBindConfig{ ClientId: jsii.String("clientId"), ProviderName: jsii.String("providerName"), ServerSideTokenCheck: jsii.Boolean(false), }
Experimental.
type UserPoolAuthenticationProviderBindOptions ¶
type UserPoolAuthenticationProviderBindOptions struct { }
Represents UserPoolAuthenticationProvider Bind Options.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cognito_identitypool_alpha "github.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha" userPoolAuthenticationProviderBindOptions := &UserPoolAuthenticationProviderBindOptions{ }
Experimental.
type UserPoolAuthenticationProviderProps ¶
type UserPoolAuthenticationProviderProps struct { // The User Pool of the Associated Identity Providers. // Experimental. UserPool awscognito.IUserPool `field:"required" json:"userPool" yaml:"userPool"` // Setting this to true turns off identity pool checks for this user pool to make sure the user has not been globally signed out or deleted before the identity pool provides an OIDC token or AWS credentials for the user. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitoidentityprovider.html // // Default: false. // // Experimental. DisableServerSideTokenCheck *bool `field:"optional" json:"disableServerSideTokenCheck" yaml:"disableServerSideTokenCheck"` // The User Pool Client for the provided User Pool. // Default: - A default user pool client will be added to User Pool. // // Experimental. UserPoolClient awscognito.IUserPoolClient `field:"optional" json:"userPoolClient" yaml:"userPoolClient"` }
Props for the User Pool Authentication Provider.
Example:
var identityPool identityPool userPool := cognito.NewUserPool(this, jsii.String("Pool")) identityPool.AddUserPoolAuthentication(awscdkcognitoidentitypoolalpha.NewUserPoolAuthenticationProvider(&UserPoolAuthenticationProviderProps{ UserPool: UserPool, DisableServerSideTokenCheck: jsii.Boolean(true), }))
Experimental.
Source Files
¶
- IIdentityPool.go
- IUserPoolAuthenticationProvider.go
- IUserPoolAuthenticationProvider__checks.go
- IdentityPool.go
- IdentityPoolAmazonLoginProvider.go
- IdentityPoolAppleLoginProvider.go
- IdentityPoolAuthenticationProviders.go
- IdentityPoolFacebookLoginProvider.go
- IdentityPoolGoogleLoginProvider.go
- IdentityPoolProps.go
- IdentityPoolProviderType.go
- IdentityPoolProviderUrl.go
- IdentityPoolProviderUrl__checks.go
- IdentityPoolRoleMapping.go
- IdentityPoolTwitterLoginProvider.go
- IdentityPool__checks.go
- RoleMappingMatchType.go
- RoleMappingRule.go
- UserPoolAuthenticationProvider.go
- UserPoolAuthenticationProviderBindConfig.go
- UserPoolAuthenticationProviderBindOptions.go
- UserPoolAuthenticationProviderProps.go
- UserPoolAuthenticationProvider__checks.go
- main.go