Class: Authentik::Api::IdentificationChallenge
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::IdentificationChallenge
- Defined in:
- lib/authentik/api/models/identification_challenge.rb
Overview
Identification challenges with all UI elements
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_show_password ⇒ Object
Returns the value of attribute allow_show_password.
-
#application_pre ⇒ Object
Returns the value of attribute application_pre.
-
#application_pre_launch ⇒ Object
Returns the value of attribute application_pre_launch.
-
#captcha_stage ⇒ Object
Returns the value of attribute captcha_stage.
-
#component ⇒ Object
Returns the value of attribute component.
-
#enable_remember_me ⇒ Object
Returns the value of attribute enable_remember_me.
-
#enroll_url ⇒ Object
Returns the value of attribute enroll_url.
-
#flow_designation ⇒ Object
Returns the value of attribute flow_designation.
-
#flow_info ⇒ Object
Returns the value of attribute flow_info.
-
#passkey_challenge ⇒ Object
Returns the value of attribute passkey_challenge.
-
#password_fields ⇒ Object
Returns the value of attribute password_fields.
-
#passwordless_url ⇒ Object
Returns the value of attribute passwordless_url.
-
#pending_user_identifier ⇒ Object
Returns the value of attribute pending_user_identifier.
-
#primary_action ⇒ Object
Returns the value of attribute primary_action.
-
#recovery_url ⇒ Object
Returns the value of attribute recovery_url.
-
#response_errors ⇒ Object
Returns the value of attribute response_errors.
-
#show_source_labels ⇒ Object
Returns the value of attribute show_source_labels.
-
#sources ⇒ Object
Returns the value of attribute sources.
-
#user_fields ⇒ Object
Returns the value of attribute user_fields.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IdentificationChallenge
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ IdentificationChallenge
Initializes the object
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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 145 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::IdentificationChallenge` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::IdentificationChallenge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'flow_info') self.flow_info = attributes[:'flow_info'] end if attributes.key?(:'component') self.component = attributes[:'component'] else self.component = 'ak-stage-identification' end if attributes.key?(:'response_errors') if (value = attributes[:'response_errors']).is_a?(Hash) self.response_errors = value end end if attributes.key?(:'user_fields') if (value = attributes[:'user_fields']).is_a?(Array) self.user_fields = value end else self.user_fields = nil end if attributes.key?(:'pending_user_identifier') self.pending_user_identifier = attributes[:'pending_user_identifier'] end if attributes.key?(:'password_fields') self.password_fields = attributes[:'password_fields'] else self.password_fields = nil end if attributes.key?(:'allow_show_password') self.allow_show_password = attributes[:'allow_show_password'] else self.allow_show_password = false end if attributes.key?(:'application_pre') self.application_pre = attributes[:'application_pre'] end if attributes.key?(:'application_pre_launch') self.application_pre_launch = attributes[:'application_pre_launch'] end if attributes.key?(:'flow_designation') self.flow_designation = attributes[:'flow_designation'] else self.flow_designation = nil end if attributes.key?(:'captcha_stage') self.captcha_stage = attributes[:'captcha_stage'] end if attributes.key?(:'enroll_url') self.enroll_url = attributes[:'enroll_url'] end if attributes.key?(:'recovery_url') self.recovery_url = attributes[:'recovery_url'] end if attributes.key?(:'passwordless_url') self.passwordless_url = attributes[:'passwordless_url'] end if attributes.key?(:'primary_action') self.primary_action = attributes[:'primary_action'] else self.primary_action = nil end if attributes.key?(:'sources') if (value = attributes[:'sources']).is_a?(Array) self.sources = value end end if attributes.key?(:'show_source_labels') self.show_source_labels = attributes[:'show_source_labels'] else self.show_source_labels = nil end if attributes.key?(:'enable_remember_me') self.enable_remember_me = attributes[:'enable_remember_me'] else self.enable_remember_me = true end if attributes.key?(:'passkey_challenge') if (value = attributes[:'passkey_challenge']).is_a?(Hash) self.passkey_challenge = value end end end |
Instance Attribute Details
#allow_show_password ⇒ Object
Returns the value of attribute allow_show_password.
25 26 27 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 25 def allow_show_password @allow_show_password end |
#application_pre ⇒ Object
Returns the value of attribute application_pre.
27 28 29 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 27 def application_pre @application_pre end |
#application_pre_launch ⇒ Object
Returns the value of attribute application_pre_launch.
29 30 31 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 29 def application_pre_launch @application_pre_launch end |
#captcha_stage ⇒ Object
Returns the value of attribute captcha_stage.
33 34 35 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 33 def captcha_stage @captcha_stage end |
#component ⇒ Object
Returns the value of attribute component.
15 16 17 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 15 def component @component end |
#enable_remember_me ⇒ Object
Returns the value of attribute enable_remember_me.
47 48 49 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 47 def enable_remember_me @enable_remember_me end |
#enroll_url ⇒ Object
Returns the value of attribute enroll_url.
35 36 37 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 35 def enroll_url @enroll_url end |
#flow_designation ⇒ Object
Returns the value of attribute flow_designation.
31 32 33 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 31 def flow_designation @flow_designation end |
#flow_info ⇒ Object
Returns the value of attribute flow_info.
13 14 15 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 13 def flow_info @flow_info end |
#passkey_challenge ⇒ Object
Returns the value of attribute passkey_challenge.
49 50 51 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 49 def passkey_challenge @passkey_challenge end |
#password_fields ⇒ Object
Returns the value of attribute password_fields.
23 24 25 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 23 def password_fields @password_fields end |
#passwordless_url ⇒ Object
Returns the value of attribute passwordless_url.
39 40 41 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 39 def passwordless_url @passwordless_url end |
#pending_user_identifier ⇒ Object
Returns the value of attribute pending_user_identifier.
21 22 23 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 21 def pending_user_identifier @pending_user_identifier end |
#primary_action ⇒ Object
Returns the value of attribute primary_action.
41 42 43 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 41 def primary_action @primary_action end |
#recovery_url ⇒ Object
Returns the value of attribute recovery_url.
37 38 39 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 37 def recovery_url @recovery_url end |
#response_errors ⇒ Object
Returns the value of attribute response_errors.
17 18 19 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 17 def response_errors @response_errors end |
#show_source_labels ⇒ Object
Returns the value of attribute show_source_labels.
45 46 47 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 45 def show_source_labels @show_source_labels end |
#sources ⇒ Object
Returns the value of attribute sources.
43 44 45 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 43 def sources @sources end |
#user_fields ⇒ Object
Returns the value of attribute user_fields.
19 20 21 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 19 def user_fields @user_fields end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
99 100 101 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 99 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
104 105 106 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 104 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 74 def self.attribute_map { :'flow_info' => :'flow_info', :'component' => :'component', :'response_errors' => :'response_errors', :'user_fields' => :'user_fields', :'pending_user_identifier' => :'pending_user_identifier', :'password_fields' => :'password_fields', :'allow_show_password' => :'allow_show_password', :'application_pre' => :'application_pre', :'application_pre_launch' => :'application_pre_launch', :'flow_designation' => :'flow_designation', :'captcha_stage' => :'captcha_stage', :'enroll_url' => :'enroll_url', :'recovery_url' => :'recovery_url', :'passwordless_url' => :'passwordless_url', :'primary_action' => :'primary_action', :'sources' => :'sources', :'show_source_labels' => :'show_source_labels', :'enable_remember_me' => :'enable_remember_me', :'passkey_challenge' => :'passkey_challenge' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 376 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
134 135 136 137 138 139 140 141 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 134 def self.openapi_nullable Set.new([ :'user_fields', :'pending_user_identifier', :'captcha_stage', :'passkey_challenge' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 109 def self.openapi_types { :'flow_info' => :'ContextualFlowInfo', :'component' => :'String', :'response_errors' => :'Hash<String, Array<ErrorDetail>>', :'user_fields' => :'Array<String>', :'pending_user_identifier' => :'String', :'password_fields' => :'Boolean', :'allow_show_password' => :'Boolean', :'application_pre' => :'String', :'application_pre_launch' => :'String', :'flow_designation' => :'FlowDesignationEnum', :'captcha_stage' => :'CaptchaChallenge', :'enroll_url' => :'String', :'recovery_url' => :'String', :'passwordless_url' => :'String', :'primary_action' => :'String', :'sources' => :'Array<LoginSource>', :'show_source_labels' => :'Boolean', :'enable_remember_me' => :'Boolean', :'passkey_challenge' => :'Hash<String, Object>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 337 def ==(o) return true if self.equal?(o) self.class == o.class && flow_info == o.flow_info && component == o.component && response_errors == o.response_errors && user_fields == o.user_fields && pending_user_identifier == o.pending_user_identifier && password_fields == o.password_fields && allow_show_password == o.allow_show_password && application_pre == o.application_pre && application_pre_launch == o.application_pre_launch && flow_designation == o.flow_designation && captcha_stage == o.captcha_stage && enroll_url == o.enroll_url && recovery_url == o.recovery_url && passwordless_url == o.passwordless_url && primary_action == o.primary_action && sources == o.sources && show_source_labels == o.show_source_labels && enable_remember_me == o.enable_remember_me && passkey_challenge == o.passkey_challenge end |
#eql?(o) ⇒ Boolean
363 364 365 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 363 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
369 370 371 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 369 def hash [flow_info, component, response_errors, user_fields, pending_user_identifier, password_fields, allow_show_password, application_pre, application_pre_launch, flow_designation, captcha_stage, enroll_url, recovery_url, passwordless_url, primary_action, sources, show_source_labels, enable_remember_me, passkey_challenge].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 262 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @password_fields.nil? invalid_properties.push('invalid value for "password_fields", password_fields cannot be nil.') end if @flow_designation.nil? invalid_properties.push('invalid value for "flow_designation", flow_designation cannot be nil.') end if @primary_action.nil? invalid_properties.push('invalid value for "primary_action", primary_action cannot be nil.') end if @show_source_labels.nil? invalid_properties.push('invalid value for "show_source_labels", show_source_labels cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 398 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
286 287 288 289 290 291 292 293 |
# File 'lib/authentik/api/models/identification_challenge.rb', line 286 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @password_fields.nil? return false if @flow_designation.nil? return false if @primary_action.nil? return false if @show_source_labels.nil? true end |