Class: OCI::IdentityDomains::Models::ExtensionMfaUser
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::ExtensionMfaUser
- Defined in:
- lib/oci/identity_domains/models/extension_mfa_user.rb
Overview
This extension defines attributes used to manage Multi-Factor Authentication within a service provider. The extension is typically applied to a User resource, but MAY be applied to other resources that use MFA.
Constant Summary collapse
- PREFERRED_AUTHENTICATION_FACTOR_ENUM =
[ PREFERRED_AUTHENTICATION_FACTOR_EMAIL = 'EMAIL'.freeze, PREFERRED_AUTHENTICATION_FACTOR_SMS = 'SMS'.freeze, PREFERRED_AUTHENTICATION_FACTOR_TOTP = 'TOTP'.freeze, PREFERRED_AUTHENTICATION_FACTOR_PUSH = 'PUSH'.freeze, PREFERRED_AUTHENTICATION_FACTOR_OFFLINETOTP = 'OFFLINETOTP'.freeze, PREFERRED_AUTHENTICATION_FACTOR_USERNAME_PASSWORD = 'USERNAME_PASSWORD'.freeze, PREFERRED_AUTHENTICATION_FACTOR_SECURITY_QUESTIONS = 'SECURITY_QUESTIONS'.freeze, PREFERRED_AUTHENTICATION_FACTOR_VOICE = 'VOICE'.freeze, PREFERRED_AUTHENTICATION_FACTOR_PHONE_CALL = 'PHONE_CALL'.freeze, PREFERRED_AUTHENTICATION_FACTOR_THIRDPARTY = 'THIRDPARTY'.freeze, PREFERRED_AUTHENTICATION_FACTOR_FIDO_AUTHENTICATOR = 'FIDO_AUTHENTICATOR'.freeze, PREFERRED_AUTHENTICATION_FACTOR_YUBICO_OTP = 'YUBICO_OTP'.freeze, PREFERRED_AUTHENTICATION_FACTOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MFA_STATUS_ENUM =
[ MFA_STATUS_ENROLLED = 'ENROLLED'.freeze, MFA_STATUS_IGNORED = 'IGNORED'.freeze, MFA_STATUS_UN_ENROLLED = 'UN_ENROLLED'.freeze, MFA_STATUS_DISABLED = 'DISABLED'.freeze, MFA_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#bypass_codes ⇒ Array<OCI::IdentityDomains::Models::UserExtBypassCodes>
A list of bypass codes that belongs to the user.
-
#devices ⇒ Array<OCI::IdentityDomains::Models::UserExtDevices>
A list of devices enrolled by the user.
-
#login_attempts ⇒ Integer
The number of incorrect multi factor authentication sign in attempts made by this user.
-
#mfa_enabled_on ⇒ String
The date when the user enrolled in multi factor authentication.
-
#mfa_ignored_apps ⇒ Array<String>
User MFA Ignored Apps Identifiers.
-
#mfa_status ⇒ String
The user opted for MFA.
-
#preferred_authentication_factor ⇒ String
The preferred authentication factor type.
-
#preferred_authentication_method ⇒ String
The preferred authentication method.
- #preferred_device ⇒ OCI::IdentityDomains::Models::UserExtPreferredDevice
-
#preferred_third_party_vendor ⇒ String
The preferred third-party vendor name.
-
#trusted_user_agents ⇒ Array<OCI::IdentityDomains::Models::UserExtTrustedUserAgents>
A list of trusted User Agents owned by this user.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ExtensionMfaUser
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ExtensionMfaUser
Initializes the object
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 252 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.preferred_authentication_factor = attributes[:'preferredAuthenticationFactor'] if attributes[:'preferredAuthenticationFactor'] raise 'You cannot provide both :preferredAuthenticationFactor and :preferred_authentication_factor' if attributes.key?(:'preferredAuthenticationFactor') && attributes.key?(:'preferred_authentication_factor') self.preferred_authentication_factor = attributes[:'preferred_authentication_factor'] if attributes[:'preferred_authentication_factor'] self.mfa_status = attributes[:'mfaStatus'] if attributes[:'mfaStatus'] raise 'You cannot provide both :mfaStatus and :mfa_status' if attributes.key?(:'mfaStatus') && attributes.key?(:'mfa_status') self.mfa_status = attributes[:'mfa_status'] if attributes[:'mfa_status'] self.preferred_third_party_vendor = attributes[:'preferredThirdPartyVendor'] if attributes[:'preferredThirdPartyVendor'] raise 'You cannot provide both :preferredThirdPartyVendor and :preferred_third_party_vendor' if attributes.key?(:'preferredThirdPartyVendor') && attributes.key?(:'preferred_third_party_vendor') self.preferred_third_party_vendor = attributes[:'preferred_third_party_vendor'] if attributes[:'preferred_third_party_vendor'] self.preferred_authentication_method = attributes[:'preferredAuthenticationMethod'] if attributes[:'preferredAuthenticationMethod'] raise 'You cannot provide both :preferredAuthenticationMethod and :preferred_authentication_method' if attributes.key?(:'preferredAuthenticationMethod') && attributes.key?(:'preferred_authentication_method') self.preferred_authentication_method = attributes[:'preferred_authentication_method'] if attributes[:'preferred_authentication_method'] self.login_attempts = attributes[:'loginAttempts'] if attributes[:'loginAttempts'] raise 'You cannot provide both :loginAttempts and :login_attempts' if attributes.key?(:'loginAttempts') && attributes.key?(:'login_attempts') self.login_attempts = attributes[:'login_attempts'] if attributes[:'login_attempts'] self.mfa_enabled_on = attributes[:'mfaEnabledOn'] if attributes[:'mfaEnabledOn'] raise 'You cannot provide both :mfaEnabledOn and :mfa_enabled_on' if attributes.key?(:'mfaEnabledOn') && attributes.key?(:'mfa_enabled_on') self.mfa_enabled_on = attributes[:'mfa_enabled_on'] if attributes[:'mfa_enabled_on'] self.mfa_ignored_apps = attributes[:'mfaIgnoredApps'] if attributes[:'mfaIgnoredApps'] raise 'You cannot provide both :mfaIgnoredApps and :mfa_ignored_apps' if attributes.key?(:'mfaIgnoredApps') && attributes.key?(:'mfa_ignored_apps') self.mfa_ignored_apps = attributes[:'mfa_ignored_apps'] if attributes[:'mfa_ignored_apps'] self.preferred_device = attributes[:'preferredDevice'] if attributes[:'preferredDevice'] raise 'You cannot provide both :preferredDevice and :preferred_device' if attributes.key?(:'preferredDevice') && attributes.key?(:'preferred_device') self.preferred_device = attributes[:'preferred_device'] if attributes[:'preferred_device'] self.devices = attributes[:'devices'] if attributes[:'devices'] self.bypass_codes = attributes[:'bypassCodes'] if attributes[:'bypassCodes'] raise 'You cannot provide both :bypassCodes and :bypass_codes' if attributes.key?(:'bypassCodes') && attributes.key?(:'bypass_codes') self.bypass_codes = attributes[:'bypass_codes'] if attributes[:'bypass_codes'] self.trusted_user_agents = attributes[:'trustedUserAgents'] if attributes[:'trustedUserAgents'] raise 'You cannot provide both :trustedUserAgents and :trusted_user_agents' if attributes.key?(:'trustedUserAgents') && attributes.key?(:'trusted_user_agents') self.trusted_user_agents = attributes[:'trusted_user_agents'] if attributes[:'trusted_user_agents'] end |
Instance Attribute Details
#bypass_codes ⇒ Array<OCI::IdentityDomains::Models::UserExtBypassCodes>
A list of bypass codes that belongs to the user.
Added In: 18.3.6
SCIM++ Properties: - idcsCompositeKey: [value] - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none
180 181 182 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 180 def bypass_codes @bypass_codes end |
#devices ⇒ Array<OCI::IdentityDomains::Models::UserExtDevices>
A list of devices enrolled by the user.
Added In: 18.3.6
SCIM++ Properties: - idcsCompositeKey: [value] - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none
165 166 167 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 165 def devices @devices end |
#login_attempts ⇒ Integer
The number of incorrect multi factor authentication sign in attempts made by this user. The user is locked if this reaches the threshold specified in the maxIncorrectAttempts attribute in AuthenticationFactorSettings.
Added In: 18.3.6
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readOnly - idcsRequiresWriteForAccessFlows: true - idcsRequiresImmediateReadAfterWriteForAccessFlows: true - required: false - returned: default - type: integer - uniqueness: none
116 117 118 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 116 def login_attempts @login_attempts end |
#mfa_enabled_on ⇒ String
The date when the user enrolled in multi factor authentication. This will be set to null, when the user resets their factors.
Added In: 18.3.6
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: request - type: dateTime - uniqueness: none
131 132 133 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 131 def mfa_enabled_on @mfa_enabled_on end |
#mfa_ignored_apps ⇒ Array<String>
User MFA Ignored Apps Identifiers
Added In: 19.2.1
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: true - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
147 148 149 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 147 def mfa_ignored_apps @mfa_ignored_apps end |
#mfa_status ⇒ String
The user opted for MFA.
Added In: 18.3.6
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - idcsRequiresWriteForAccessFlows: true - required: false - returned: default - type: string - uniqueness: none
67 68 69 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 67 def mfa_status @mfa_status end |
#preferred_authentication_factor ⇒ String
The preferred authentication factor type.
Added In: 18.3.6
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
50 51 52 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 50 def preferred_authentication_factor @preferred_authentication_factor end |
#preferred_authentication_method ⇒ String
The preferred authentication method.
Added In: 2009232244
SCIM++ Properties: - caseExact: true - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
99 100 101 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 99 def preferred_authentication_method @preferred_authentication_method end |
#preferred_device ⇒ OCI::IdentityDomains::Models::UserExtPreferredDevice
150 151 152 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 150 def preferred_device @preferred_device end |
#preferred_third_party_vendor ⇒ String
The preferred third-party vendor name.
Added In: 19.2.1
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none
83 84 85 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 83 def preferred_third_party_vendor @preferred_third_party_vendor end |
#trusted_user_agents ⇒ Array<OCI::IdentityDomains::Models::UserExtTrustedUserAgents>
A list of trusted User Agents owned by this user. Multi-Factored Authentication uses Trusted User Agents to authenticate users. A User Agent is software application that a user uses to issue requests. For example, a User Agent could be a particular browser (possibly one of several executing on a desktop or laptop) or a particular mobile application (again, oneof several executing on a particular mobile device). A User Agent is trusted once the Multi-Factor Authentication has verified it in some way.
Added In: 18.3.6
SCIM++ Properties: - idcsCompositeKey: [value] - multiValued: true - mutability: readWrite - required: false - returned: request - type: complex - uniqueness: none
195 196 197 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 195 def trusted_user_agents @trusted_user_agents end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 198 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'preferred_authentication_factor': :'preferredAuthenticationFactor', 'mfa_status': :'mfaStatus', 'preferred_third_party_vendor': :'preferredThirdPartyVendor', 'preferred_authentication_method': :'preferredAuthenticationMethod', 'login_attempts': :'loginAttempts', 'mfa_enabled_on': :'mfaEnabledOn', 'mfa_ignored_apps': :'mfaIgnoredApps', 'preferred_device': :'preferredDevice', 'devices': :'devices', 'bypass_codes': :'bypassCodes', 'trusted_user_agents': :'trustedUserAgents' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 217 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'preferred_authentication_factor': :'String', 'mfa_status': :'String', 'preferred_third_party_vendor': :'String', 'preferred_authentication_method': :'String', 'login_attempts': :'Integer', 'mfa_enabled_on': :'String', 'mfa_ignored_apps': :'Array<String>', 'preferred_device': :'OCI::IdentityDomains::Models::UserExtPreferredDevice', 'devices': :'Array<OCI::IdentityDomains::Models::UserExtDevices>', 'bypass_codes': :'Array<OCI::IdentityDomains::Models::UserExtBypassCodes>', 'trusted_user_agents': :'Array<OCI::IdentityDomains::Models::UserExtTrustedUserAgents>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 354 def ==(other) return true if equal?(other) self.class == other.class && preferred_authentication_factor == other.preferred_authentication_factor && mfa_status == other.mfa_status && preferred_third_party_vendor == other.preferred_third_party_vendor && preferred_authentication_method == other.preferred_authentication_method && login_attempts == other.login_attempts && mfa_enabled_on == other.mfa_enabled_on && mfa_ignored_apps == other.mfa_ignored_apps && preferred_device == other.preferred_device && devices == other.devices && bypass_codes == other.bypass_codes && trusted_user_agents == other.trusted_user_agents end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 394 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
374 375 376 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 374 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
383 384 385 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 383 def hash [preferred_authentication_factor, mfa_status, preferred_third_party_vendor, preferred_authentication_method, login_attempts, mfa_enabled_on, mfa_ignored_apps, preferred_device, devices, bypass_codes, trusted_user_agents].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
427 428 429 430 431 432 433 434 435 436 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 427 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_s ⇒ String
Returns the string representation of the object
421 422 423 |
# File 'lib/oci/identity_domains/models/extension_mfa_user.rb', line 421 def to_s to_hash.to_s end |