Class: AWSCDK::Cognito::UserPoolIdentityProviderAmazonProps
- Inherits:
-
UserPoolIdentityProviderProps
- Object
- UserPoolIdentityProviderProps
- AWSCDK::Cognito::UserPoolIdentityProviderAmazonProps
- Defined in:
- cognito/user_pool_identity_provider_amazon_props.rb
Overview
Properties to initialize UserPoolAmazonIdentityProvider.
Instance Attribute Summary collapse
-
#attribute_mapping ⇒ AWSCDK::Cognito::AttributeMapping?
readonly
Mapping attributes from the identity provider to standard and custom attributes of the user pool.
-
#client_id ⇒ String
readonly
The client id recognized by Login with Amazon APIs.
-
#client_secret ⇒ String
readonly
The client secret to be accompanied with clientId for Login with Amazon APIs to authenticate the client.
-
#scopes ⇒ Array<String>?
readonly
The types of user profile data to obtain for the Amazon profile.
-
#user_pool ⇒ AWSCDK::Cognito::IUserPool
readonly
The user pool to which this construct provides identities.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user_pool:, attribute_mapping: nil, client_id:, client_secret:, scopes: nil) ⇒ UserPoolIdentityProviderAmazonProps
constructor
A new instance of UserPoolIdentityProviderAmazonProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(user_pool:, attribute_mapping: nil, client_id:, client_secret:, scopes: nil) ⇒ UserPoolIdentityProviderAmazonProps
Returns a new instance of UserPoolIdentityProviderAmazonProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 12 def initialize(user_pool:, attribute_mapping: nil, client_id:, client_secret:, scopes: nil) @user_pool = user_pool Jsii::Type.check_type(@user_pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2wifQ==")), "userPool") @attribute_mapping = attribute_mapping.is_a?(Hash) ? ::AWSCDK::Cognito::AttributeMapping.new(**attribute_mapping.transform_keys(&:to_sym)) : attribute_mapping Jsii::Type.check_type(@attribute_mapping, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5BdHRyaWJ1dGVNYXBwaW5nIn0=")), "attributeMapping") unless @attribute_mapping.nil? @client_id = client_id Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId") @client_secret = client_secret Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientSecret") @scopes = scopes Jsii::Type.check_type(@scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "scopes") unless @scopes.nil? end |
Instance Attribute Details
#attribute_mapping ⇒ AWSCDK::Cognito::AttributeMapping? (readonly)
Default: - no attribute mapping
Mapping attributes from the identity provider to standard and custom attributes of the user pool.
33 34 35 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 33 def attribute_mapping @attribute_mapping end |
#client_id ⇒ String (readonly)
The client id recognized by Login with Amazon APIs.
38 39 40 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 38 def client_id @client_id end |
#client_secret ⇒ String (readonly)
The client secret to be accompanied with clientId for Login with Amazon APIs to authenticate the client.
43 44 45 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 43 def client_secret @client_secret end |
#scopes ⇒ Array<String>? (readonly)
Default: [ profile ]
The types of user profile data to obtain for the Amazon profile.
49 50 51 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 49 def scopes @scopes end |
#user_pool ⇒ AWSCDK::Cognito::IUserPool (readonly)
The user pool to which this construct provides identities.
28 29 30 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 28 def user_pool @user_pool end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 51 def self.jsii_properties { :user_pool => "userPool", :attribute_mapping => "attributeMapping", :client_id => "clientId", :client_secret => "clientSecret", :scopes => "scopes", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'cognito/user_pool_identity_provider_amazon_props.rb', line 61 def to_jsii result = {} result.merge!(super) result.merge!({ "userPool" => @user_pool, "attributeMapping" => @attribute_mapping, "clientId" => @client_id, "clientSecret" => @client_secret, "scopes" => @scopes, }) result.compact end |