Class: AWSCDK::Cognito::UserPoolIdentityProviderSamlProps

Inherits:
UserPoolIdentityProviderProps
  • Object
show all
Defined in:
cognito/user_pool_identity_provider_saml_props.rb

Overview

Properties to initialize UserPoolIdentityProviderSaml.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_pool:, attribute_mapping: nil, metadata:, encrypted_responses: nil, identifiers: nil, idp_initiated: nil, idp_signout: nil, name: nil, request_signing_algorithm: nil) ⇒ UserPoolIdentityProviderSamlProps

Returns a new instance of UserPoolIdentityProviderSamlProps.

Parameters:

  • user_pool (AWSCDK::Cognito::IUserPool)

    The user pool to which this construct provides identities.

  • attribute_mapping (AWSCDK::Cognito::AttributeMapping, nil) (defaults to: nil)

    Mapping attributes from the identity provider to standard and custom attributes of the user pool.

  • metadata (AWSCDK::Cognito::UserPoolIdentityProviderSamlMetadata)

    The SAML metadata.

  • encrypted_responses (Boolean, nil) (defaults to: nil)

    Whether to require encrypted SAML assertions from IdP.

  • identifiers (Array<String>, nil) (defaults to: nil)

    Identifiers.

  • idp_initiated (Boolean, nil) (defaults to: nil)

    Whether to enable IdP-initiated SAML auth flows.

  • idp_signout (Boolean, nil) (defaults to: nil)

    Whether to enable the "Sign-out flow" feature.

  • name (String, nil) (defaults to: nil)

    The name of the provider.

  • request_signing_algorithm (AWSCDK::Cognito::SigningAlgorithm, nil) (defaults to: nil)

    The signing algorithm for SAML requests.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 16

def initialize(user_pool:, attribute_mapping: nil, metadata:, encrypted_responses: nil, identifiers: nil, idp_initiated: nil, idp_signout: nil, name: nil, request_signing_algorithm: 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?
  @metadata = 
  Jsii::Type.check_type(@metadata, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Vc2VyUG9vbElkZW50aXR5UHJvdmlkZXJTYW1sTWV0YWRhdGEifQ==")), "metadata")
  @encrypted_responses = encrypted_responses
  Jsii::Type.check_type(@encrypted_responses, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "encryptedResponses") unless @encrypted_responses.nil?
  @identifiers = identifiers
  Jsii::Type.check_type(@identifiers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "identifiers") unless @identifiers.nil?
  @idp_initiated = idp_initiated
  Jsii::Type.check_type(@idp_initiated, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "idpInitiated") unless @idp_initiated.nil?
  @idp_signout = idp_signout
  Jsii::Type.check_type(@idp_signout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "idpSignout") unless @idp_signout.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @request_signing_algorithm = request_signing_algorithm
  Jsii::Type.check_type(@request_signing_algorithm, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5TaWduaW5nQWxnb3JpdGhtIn0=")), "requestSigningAlgorithm") unless @request_signing_algorithm.nil?
end

Instance Attribute Details

#attribute_mappingAWSCDK::Cognito::AttributeMapping? (readonly)

Note:

Default: - no attribute mapping

Mapping attributes from the identity provider to standard and custom attributes of the user pool.



45
46
47
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 45

def attribute_mapping
  @attribute_mapping
end

#encrypted_responsesBoolean? (readonly)

Note:

Default: false

Whether to require encrypted SAML assertions from IdP.



55
56
57
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 55

def encrypted_responses
  @encrypted_responses
end

#identifiersArray<String>? (readonly)

Note:

Default: - no identifiers used

Identifiers.

Identifiers can be used to redirect users to the correct IdP in multitenant apps.

Returns:

  • (Array<String>, nil)


62
63
64
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 62

def identifiers
  @identifiers
end

#idp_initiatedBoolean? (readonly)

Note:

Default: false

Whether to enable IdP-initiated SAML auth flows.

Returns:

  • (Boolean, nil)


67
68
69
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 67

def idp_initiated
  @idp_initiated
end

#idp_signoutBoolean? (readonly)

Note:

Default: - false

Whether to enable the "Sign-out flow" feature.

Returns:

  • (Boolean, nil)


72
73
74
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 72

def idp_signout
  @idp_signout
end

#metadataAWSCDK::Cognito::UserPoolIdentityProviderSamlMetadata (readonly)

The SAML metadata.



49
50
51
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 49

def 
  @metadata
end

#nameString? (readonly)

Note:

Default: - the unique ID of the construct

The name of the provider.

Must be between 3 and 32 characters.

Returns:

  • (String, nil)


79
80
81
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 79

def name
  @name
end

#request_signing_algorithmAWSCDK::Cognito::SigningAlgorithm? (readonly)

Note:

Default: - don't sign requests

The signing algorithm for SAML requests.



85
86
87
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 85

def request_signing_algorithm
  @request_signing_algorithm
end

#user_poolAWSCDK::Cognito::IUserPool (readonly)

The user pool to which this construct provides identities.



40
41
42
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 40

def user_pool
  @user_pool
end

Class Method Details

.jsii_propertiesObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 87

def self.jsii_properties
  {
    :user_pool => "userPool",
    :attribute_mapping => "attributeMapping",
    :metadata => "metadata",
    :encrypted_responses => "encryptedResponses",
    :identifiers => "identifiers",
    :idp_initiated => "idpInitiated",
    :idp_signout => "idpSignout",
    :name => "name",
    :request_signing_algorithm => "requestSigningAlgorithm",
  }
end

Instance Method Details

#to_jsiiObject



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'cognito/user_pool_identity_provider_saml_props.rb', line 101

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "userPool" => @user_pool,
    "attributeMapping" => @attribute_mapping,
    "metadata" => @metadata,
    "encryptedResponses" => @encrypted_responses,
    "identifiers" => @identifiers,
    "idpInitiated" => @idp_initiated,
    "idpSignout" => @idp_signout,
    "name" => @name,
    "requestSigningAlgorithm" => @request_signing_algorithm,
  })
  result.compact
end