Class: AWSCDK::Cognito::UserPoolIdentityProviderOidcProps
- Inherits:
-
UserPoolIdentityProviderProps
- Object
- UserPoolIdentityProviderProps
- AWSCDK::Cognito::UserPoolIdentityProviderOidcProps
- Defined in:
- cognito/user_pool_identity_provider_oidc_props.rb
Overview
Properties to initialize UserPoolIdentityProviderOidc.
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.
-
#attribute_request_method ⇒ AWSCDK::Cognito::OidcAttributeRequestMethod?
readonly
The method to use to request attributes.
-
#client_id ⇒ String
readonly
The client id.
-
#client_secret ⇒ String
readonly
The client secret.
-
#endpoints ⇒ AWSCDK::Cognito::OidcEndpoints?
readonly
OpenID connect endpoints.
-
#identifiers ⇒ Array<String>?
readonly
Identifiers.
-
#issuer_url ⇒ String
readonly
Issuer URL.
-
#name ⇒ String?
readonly
The name of the provider.
-
#scopes ⇒ Array<String>?
readonly
The OAuth 2.0 scopes that you will request from OpenID Connect.
-
#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:, issuer_url:, attribute_request_method: nil, endpoints: nil, identifiers: nil, name: nil, scopes: nil) ⇒ UserPoolIdentityProviderOidcProps
constructor
A new instance of UserPoolIdentityProviderOidcProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(user_pool:, attribute_mapping: nil, client_id:, client_secret:, issuer_url:, attribute_request_method: nil, endpoints: nil, identifiers: nil, name: nil, scopes: nil) ⇒ UserPoolIdentityProviderOidcProps
Returns a new instance of UserPoolIdentityProviderOidcProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 17 def initialize(user_pool:, attribute_mapping: nil, client_id:, client_secret:, issuer_url:, attribute_request_method: nil, endpoints: nil, identifiers: nil, name: nil, 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") @issuer_url = issuer_url Jsii::Type.check_type(@issuer_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "issuerUrl") @attribute_request_method = attribute_request_method Jsii::Type.check_type(@attribute_request_method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5PaWRjQXR0cmlidXRlUmVxdWVzdE1ldGhvZCJ9")), "attributeRequestMethod") unless @attribute_request_method.nil? @endpoints = endpoints.is_a?(Hash) ? ::AWSCDK::Cognito::OidcEndpoints.new(**endpoints.transform_keys(&:to_sym)) : endpoints Jsii::Type.check_type(@endpoints, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5PaWRjRW5kcG9pbnRzIn0=")), "endpoints") unless @endpoints.nil? @identifiers = identifiers Jsii::Type.check_type(@identifiers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "identifiers") unless @identifiers.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @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.
48 49 50 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 48 def attribute_mapping @attribute_mapping end |
#attribute_request_method ⇒ AWSCDK::Cognito::OidcAttributeRequestMethod? (readonly)
Default: OidcAttributeRequestMethod.GET
The method to use to request attributes.
65 66 67 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 65 def attribute_request_method @attribute_request_method end |
#client_id ⇒ String (readonly)
The client id.
52 53 54 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 52 def client_id @client_id end |
#client_secret ⇒ String (readonly)
The client secret.
56 57 58 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 56 def client_secret @client_secret end |
#endpoints ⇒ AWSCDK::Cognito::OidcEndpoints? (readonly)
Default: - auto discovered with issuer URL
OpenID connect endpoints.
70 71 72 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 70 def endpoints @endpoints end |
#identifiers ⇒ Array<String>? (readonly)
Default: - no identifiers used
Identifiers.
Identifiers can be used to redirect users to the correct IdP in multitenant apps.
77 78 79 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 77 def identifiers @identifiers end |
#issuer_url ⇒ String (readonly)
Issuer URL.
60 61 62 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 60 def issuer_url @issuer_url end |
#name ⇒ String? (readonly)
Default: - the unique ID of the construct
The name of the provider.
82 83 84 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 82 def name @name end |
#scopes ⇒ Array<String>? (readonly)
Default: ['openid']
The OAuth 2.0 scopes that you will request from OpenID Connect. Scopes are groups of OpenID Connect user attributes to exchange with your app.
87 88 89 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 87 def scopes @scopes end |
#user_pool ⇒ AWSCDK::Cognito::IUserPool (readonly)
The user pool to which this construct provides identities.
43 44 45 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 43 def user_pool @user_pool end |
Class Method Details
.jsii_properties ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 89 def self.jsii_properties { :user_pool => "userPool", :attribute_mapping => "attributeMapping", :client_id => "clientId", :client_secret => "clientSecret", :issuer_url => "issuerUrl", :attribute_request_method => "attributeRequestMethod", :endpoints => "endpoints", :identifiers => "identifiers", :name => "name", :scopes => "scopes", } end |
Instance Method Details
#to_jsii ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'cognito/user_pool_identity_provider_oidc_props.rb', line 104 def to_jsii result = {} result.merge!(super) result.merge!({ "userPool" => @user_pool, "attributeMapping" => @attribute_mapping, "clientId" => @client_id, "clientSecret" => @client_secret, "issuerUrl" => @issuer_url, "attributeRequestMethod" => @attribute_request_method, "endpoints" => @endpoints, "identifiers" => @identifiers, "name" => @name, "scopes" => @scopes, }) result.compact end |