Class: AWSCDK::CognitoIdentitypool::IdentityPoolAuthenticationProviders

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito_identitypool/identity_pool_authentication_providers.rb

Overview

External Authentication Providers for usage in Identity Pool.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(amazon: nil, apple: nil, custom_provider: nil, facebook: nil, google: nil, open_id_connect_providers: nil, saml_providers: nil, twitter: nil, user_pools: nil) ⇒ IdentityPoolAuthenticationProviders

Returns a new instance of IdentityPoolAuthenticationProviders.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 18

def initialize(amazon: nil, apple: nil, custom_provider: nil, facebook: nil, google: nil, open_id_connect_providers: nil, saml_providers: nil, twitter: nil, user_pools: nil)
  @amazon = amazon.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolAmazonLoginProvider.new(**amazon.transform_keys(&:to_sym)) : amazon
  Jsii::Type.check_type(@amazon, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sQW1hem9uTG9naW5Qcm92aWRlciJ9")), "amazon") unless @amazon.nil?
  @apple = apple.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolAppleLoginProvider.new(**apple.transform_keys(&:to_sym)) : apple
  Jsii::Type.check_type(@apple, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sQXBwbGVMb2dpblByb3ZpZGVyIn0=")), "apple") unless @apple.nil?
  @custom_provider = custom_provider
  Jsii::Type.check_type(@custom_provider, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customProvider") unless @custom_provider.nil?
  @facebook = facebook.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolFacebookLoginProvider.new(**facebook.transform_keys(&:to_sym)) : facebook
  Jsii::Type.check_type(@facebook, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sRmFjZWJvb2tMb2dpblByb3ZpZGVyIn0=")), "facebook") unless @facebook.nil?
  @google = google.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolGoogleLoginProvider.new(**google.transform_keys(&:to_sym)) : google
  Jsii::Type.check_type(@google, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sR29vZ2xlTG9naW5Qcm92aWRlciJ9")), "google") unless @google.nil?
  @open_id_connect_providers = open_id_connect_providers
  Jsii::Type.check_type(@open_id_connect_providers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2lhbS5JT0lEQ1Byb3ZpZGVyUmVmIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "openIdConnectProviders") unless @open_id_connect_providers.nil?
  @saml_providers = saml_providers
  Jsii::Type.check_type(@saml_providers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2lhbS5JU0FNTFByb3ZpZGVyUmVmIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "samlProviders") unless @saml_providers.nil?
  @twitter = twitter.is_a?(Hash) ? ::AWSCDK::CognitoIdentitypool::IdentityPoolTwitterLoginProvider.new(**twitter.transform_keys(&:to_sym)) : twitter
  Jsii::Type.check_type(@twitter, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0b19pZGVudGl0eXBvb2wuSWRlbnRpdHlQb29sVHdpdHRlckxvZ2luUHJvdmlkZXIifQ==")), "twitter") unless @twitter.nil?
  @user_pools = user_pools
  Jsii::Type.check_type(@user_pools, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvX2lkZW50aXR5cG9vbC5JVXNlclBvb2xBdXRoZW50aWNhdGlvblByb3ZpZGVyIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "userPools") unless @user_pools.nil?
end

Instance Attribute Details

#amazonAWSCDK::CognitoIdentitypool::IdentityPoolAmazonLoginProvider? (readonly)

Note:

Default: - No Amazon Authentication Provider used without OpenIdConnect or a User Pool

The Amazon Authentication Provider associated with this Identity Pool.



43
44
45
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 43

def amazon
  @amazon
end

#appleAWSCDK::CognitoIdentitypool::IdentityPoolAppleLoginProvider? (readonly)

Note:

Default: - No Apple Authentication Provider used without OpenIdConnect or a User Pool

The Apple Authentication Provider associated with this Identity Pool.



48
49
50
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 48

def apple
  @apple
end

#custom_providerString? (readonly)

Note:

Default: - no custom provider

The developer provider name to associate with this Identity Pool.

Returns:

  • (String, nil)


53
54
55
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 53

def custom_provider
  @custom_provider
end

#facebookAWSCDK::CognitoIdentitypool::IdentityPoolFacebookLoginProvider? (readonly)

Note:

Default: - No Facebook Authentication Provider used without OpenIdConnect or a User Pool

The Facebook Authentication Provider associated with this Identity Pool.



58
59
60
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 58

def facebook
  @facebook
end

#googleAWSCDK::CognitoIdentitypool::IdentityPoolGoogleLoginProvider? (readonly)

Note:

Default: - No Google Authentication Provider used without OpenIdConnect or a User Pool

The Google Authentication Provider associated with this Identity Pool.



63
64
65
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 63

def google
  @google
end

#open_id_connect_providersArray<AWSCDK::Interfaces::AWSIAM::IOIDCProviderRef>? (readonly)

Note:

Default: - no OpenIdConnectProvider

The OpenIdConnect Provider associated with this Identity Pool.



68
69
70
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 68

def open_id_connect_providers
  @open_id_connect_providers
end

#saml_providersArray<AWSCDK::Interfaces::AWSIAM::ISAMLProviderRef>? (readonly)

Note:

Default: - no SamlProvider

The Security Assertion Markup Language provider associated with this Identity Pool.



73
74
75
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 73

def saml_providers
  @saml_providers
end

#twitterAWSCDK::CognitoIdentitypool::IdentityPoolTwitterLoginProvider? (readonly)

Note:

Default: - No Twitter Authentication Provider used without OpenIdConnect or a User Pool

The Twitter Authentication Provider associated with this Identity Pool.



78
79
80
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 78

def twitter
  @twitter
end

#user_poolsArray<AWSCDK::CognitoIdentitypool::IUserPoolAuthenticationProvider>? (readonly)

Note:

Default: - no User Pools associated

The User Pool Authentication Providers associated with this Identity Pool.



83
84
85
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 83

def user_pools
  @user_pools
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 85

def self.jsii_properties
  {
    :amazon => "amazon",
    :apple => "apple",
    :custom_provider => "customProvider",
    :facebook => "facebook",
    :google => "google",
    :open_id_connect_providers => "openIdConnectProviders",
    :saml_providers => "samlProviders",
    :twitter => "twitter",
    :user_pools => "userPools",
  }
end

Instance Method Details

#to_jsiiObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'cognito_identitypool/identity_pool_authentication_providers.rb', line 99

def to_jsii
  result = {}
  result.merge!({
    "amazon" => @amazon,
    "apple" => @apple,
    "customProvider" => @custom_provider,
    "facebook" => @facebook,
    "google" => @google,
    "openIdConnectProviders" => @open_id_connect_providers,
    "samlProviders" => @saml_providers,
    "twitter" => @twitter,
    "userPools" => @user_pools,
  })
  result.compact
end