Class: OCI::IdentityDomains::Models::AuthenticationFactorSettingsDuoSecuritySettings

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb

Overview

Settings related to Duo Security

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: complex - uniqueness: none

Constant Summary collapse

USER_MAPPING_ATTRIBUTE_ENUM =
[
  USER_MAPPING_ATTRIBUTE_PRIMARY_EMAIL = 'primaryEmail'.freeze,
  USER_MAPPING_ATTRIBUTE_USER_NAME = 'userName'.freeze,
  USER_MAPPING_ATTRIBUTE_GIVEN_NAME = 'givenName'.freeze,
  USER_MAPPING_ATTRIBUTE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AuthenticationFactorSettingsDuoSecuritySettings

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :integration_key (String)

    The value to assign to the #integration_key property

  • :secret_key (String)

    The value to assign to the #secret_key property

  • :attestation_key (String)

    The value to assign to the #attestation_key property

  • :api_hostname (String)

    The value to assign to the #api_hostname property

  • :user_mapping_attribute (String)

    The value to assign to the #user_mapping_attribute property



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 142

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.integration_key = attributes[:'integrationKey'] if attributes[:'integrationKey']

  raise 'You cannot provide both :integrationKey and :integration_key' if attributes.key?(:'integrationKey') && attributes.key?(:'integration_key')

  self.integration_key = attributes[:'integration_key'] if attributes[:'integration_key']

  self.secret_key = attributes[:'secretKey'] if attributes[:'secretKey']

  raise 'You cannot provide both :secretKey and :secret_key' if attributes.key?(:'secretKey') && attributes.key?(:'secret_key')

  self.secret_key = attributes[:'secret_key'] if attributes[:'secret_key']

  self.attestation_key = attributes[:'attestationKey'] if attributes[:'attestationKey']

  raise 'You cannot provide both :attestationKey and :attestation_key' if attributes.key?(:'attestationKey') && attributes.key?(:'attestation_key')

  self.attestation_key = attributes[:'attestation_key'] if attributes[:'attestation_key']

  self.api_hostname = attributes[:'apiHostname'] if attributes[:'apiHostname']

  raise 'You cannot provide both :apiHostname and :api_hostname' if attributes.key?(:'apiHostname') && attributes.key?(:'api_hostname')

  self.api_hostname = attributes[:'api_hostname'] if attributes[:'api_hostname']

  self.user_mapping_attribute = attributes[:'userMappingAttribute'] if attributes[:'userMappingAttribute']

  raise 'You cannot provide both :userMappingAttribute and :user_mapping_attribute' if attributes.key?(:'userMappingAttribute') && attributes.key?(:'user_mapping_attribute')

  self.user_mapping_attribute = attributes[:'user_mapping_attribute'] if attributes[:'user_mapping_attribute']
end

Instance Attribute Details

#api_hostnameString

[Required] Hostname to access the Duo security account

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (String)


88
89
90
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 88

def api_hostname
  @api_hostname
end

#attestation_keyString

Attestation key to attest the request and response between Duo Security

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: never - type: string - uniqueness: none

Returns:

  • (String)


73
74
75
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 73

def attestation_key
  @attestation_key
end

#integration_keyString

[Required] Integration key from Duo Security authenticator

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (String)


43
44
45
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 43

def integration_key
  @integration_key
end

#secret_keyString

[Required] Secret key from Duo Security authenticator

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (String)


58
59
60
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 58

def secret_key
  @secret_key
end

#user_mapping_attributeString

[Required] User attribute mapping value

Added In: 19.2.1

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (String)


103
104
105
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 103

def user_mapping_attribute
  @user_mapping_attribute
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



106
107
108
109
110
111
112
113
114
115
116
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 106

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'integration_key': :'integrationKey',
    'secret_key': :'secretKey',
    'attestation_key': :'attestationKey',
    'api_hostname': :'apiHostname',
    'user_mapping_attribute': :'userMappingAttribute'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 119

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'integration_key': :'String',
    'secret_key': :'String',
    'attestation_key': :'String',
    'api_hostname': :'String',
    'user_mapping_attribute': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



199
200
201
202
203
204
205
206
207
208
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 199

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    integration_key == other.integration_key &&
    secret_key == other.secret_key &&
    attestation_key == other.attestation_key &&
    api_hostname == other.api_hostname &&
    user_mapping_attribute == other.user_mapping_attribute
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 233

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


213
214
215
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 213

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



222
223
224
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 222

def hash
  [integration_key, secret_key, attestation_key, api_hostname, user_mapping_attribute].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



266
267
268
269
270
271
272
273
274
275
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 266

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



260
261
262
# File 'lib/oci/identity_domains/models/authentication_factor_settings_duo_security_settings.rb', line 260

def to_s
  to_hash.to_s
end