Class: Authentik::Api::IdentificationStageRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::IdentificationStageRequest
- Defined in:
- lib/authentik/api/models/identification_stage_request.rb
Overview
IdentificationStage Serializer
Instance Attribute Summary collapse
-
#captcha_stage ⇒ Object
When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage.
-
#case_insensitive_matching ⇒ Object
When enabled, user fields are matched regardless of their casing.
-
#enable_remember_me ⇒ Object
Show the user the ‘Remember me on this device’ toggle, allowing repeat users to skip straight to entering their password.
-
#enrollment_flow ⇒ Object
Optional enrollment flow, which is linked at the bottom of the page.
-
#name ⇒ Object
Returns the value of attribute name.
-
#password_stage ⇒ Object
When set, shows a password field, instead of showing the password field as separate step.
-
#passwordless_flow ⇒ Object
Optional passwordless flow, which is linked at the bottom of the page.
-
#pretend_user_exists ⇒ Object
When enabled, the stage will succeed and continue even when incorrect user info is entered.
-
#recovery_flow ⇒ Object
Optional recovery flow, which is linked at the bottom of the page.
-
#show_matched_user ⇒ Object
When a valid username/email has been entered, and this option is enabled, the user’s username and avatar will be shown.
-
#show_source_labels ⇒ Object
Returns the value of attribute show_source_labels.
-
#sources ⇒ Object
Specify which sources should be shown.
-
#user_fields ⇒ Object
Fields of the user object to match against.
-
#webauthn_stage ⇒ Object
When set, and conditional WebAuthn is available, allow the user to use their passkey as a first factor.
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 = {}) ⇒ IdentificationStageRequest
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 = {}) ⇒ IdentificationStageRequest
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 117 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::IdentificationStageRequest` 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::IdentificationStageRequest`. 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?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'user_fields') if (value = attributes[:'user_fields']).is_a?(Array) self.user_fields = value end end if attributes.key?(:'password_stage') self.password_stage = attributes[:'password_stage'] end if attributes.key?(:'captcha_stage') self.captcha_stage = attributes[:'captcha_stage'] end if attributes.key?(:'case_insensitive_matching') self.case_insensitive_matching = attributes[:'case_insensitive_matching'] end if attributes.key?(:'show_matched_user') self.show_matched_user = attributes[:'show_matched_user'] end if attributes.key?(:'enrollment_flow') self.enrollment_flow = attributes[:'enrollment_flow'] end if attributes.key?(:'recovery_flow') self.recovery_flow = attributes[:'recovery_flow'] end if attributes.key?(:'passwordless_flow') self.passwordless_flow = attributes[:'passwordless_flow'] 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'] end if attributes.key?(:'pretend_user_exists') self.pretend_user_exists = attributes[:'pretend_user_exists'] end if attributes.key?(:'enable_remember_me') self.enable_remember_me = attributes[:'enable_remember_me'] end if attributes.key?(:'webauthn_stage') self.webauthn_stage = attributes[:'webauthn_stage'] end end |
Instance Attribute Details
#captcha_stage ⇒ Object
When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage.
22 23 24 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 22 def captcha_stage @captcha_stage end |
#case_insensitive_matching ⇒ Object
When enabled, user fields are matched regardless of their casing.
25 26 27 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 25 def case_insensitive_matching @case_insensitive_matching end |
#enable_remember_me ⇒ Object
Show the user the ‘Remember me on this device’ toggle, allowing repeat users to skip straight to entering their password.
48 49 50 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 48 def enable_remember_me @enable_remember_me end |
#enrollment_flow ⇒ Object
Optional enrollment flow, which is linked at the bottom of the page.
31 32 33 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 31 def enrollment_flow @enrollment_flow end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 13 def name @name end |
#password_stage ⇒ Object
When set, shows a password field, instead of showing the password field as separate step.
19 20 21 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 19 def password_stage @password_stage end |
#passwordless_flow ⇒ Object
Optional passwordless flow, which is linked at the bottom of the page.
37 38 39 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 37 def passwordless_flow @passwordless_flow end |
#pretend_user_exists ⇒ Object
When enabled, the stage will succeed and continue even when incorrect user info is entered.
45 46 47 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 45 def pretend_user_exists @pretend_user_exists end |
#recovery_flow ⇒ Object
Optional recovery flow, which is linked at the bottom of the page.
34 35 36 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 34 def recovery_flow @recovery_flow end |
#show_matched_user ⇒ Object
When a valid username/email has been entered, and this option is enabled, the user’s username and avatar will be shown. Otherwise, the text that the user entered will be shown
28 29 30 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 28 def show_matched_user @show_matched_user end |
#show_source_labels ⇒ Object
Returns the value of attribute show_source_labels.
42 43 44 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 42 def show_source_labels @show_source_labels end |
#sources ⇒ Object
Specify which sources should be shown.
40 41 42 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 40 def sources @sources end |
#user_fields ⇒ Object
Fields of the user object to match against. (Hold shift to select multiple options)
16 17 18 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 16 def user_fields @user_fields end |
#webauthn_stage ⇒ Object
When set, and conditional WebAuthn is available, allow the user to use their passkey as a first factor.
51 52 53 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 51 def webauthn_stage @webauthn_stage end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
74 75 76 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 74 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
79 80 81 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 79 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 54 def self.attribute_map { :'name' => :'name', :'user_fields' => :'user_fields', :'password_stage' => :'password_stage', :'captcha_stage' => :'captcha_stage', :'case_insensitive_matching' => :'case_insensitive_matching', :'show_matched_user' => :'show_matched_user', :'enrollment_flow' => :'enrollment_flow', :'recovery_flow' => :'recovery_flow', :'passwordless_flow' => :'passwordless_flow', :'sources' => :'sources', :'show_source_labels' => :'show_source_labels', :'pretend_user_exists' => :'pretend_user_exists', :'enable_remember_me' => :'enable_remember_me', :'webauthn_stage' => :'webauthn_stage' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 269 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
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 104 def self.openapi_nullable Set.new([ :'password_stage', :'captcha_stage', :'enrollment_flow', :'recovery_flow', :'passwordless_flow', :'webauthn_stage' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 84 def self.openapi_types { :'name' => :'String', :'user_fields' => :'Array<UserFieldsEnum>', :'password_stage' => :'String', :'captcha_stage' => :'String', :'case_insensitive_matching' => :'Boolean', :'show_matched_user' => :'Boolean', :'enrollment_flow' => :'String', :'recovery_flow' => :'String', :'passwordless_flow' => :'String', :'sources' => :'Array<String>', :'show_source_labels' => :'Boolean', :'pretend_user_exists' => :'Boolean', :'enable_remember_me' => :'Boolean', :'webauthn_stage' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 235 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && user_fields == o.user_fields && password_stage == o.password_stage && captcha_stage == o.captcha_stage && case_insensitive_matching == o.case_insensitive_matching && show_matched_user == o.show_matched_user && enrollment_flow == o.enrollment_flow && recovery_flow == o.recovery_flow && passwordless_flow == o.passwordless_flow && sources == o.sources && show_source_labels == o.show_source_labels && pretend_user_exists == o.pretend_user_exists && enable_remember_me == o.enable_remember_me && webauthn_stage == o.webauthn_stage end |
#eql?(o) ⇒ Boolean
256 257 258 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 256 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
262 263 264 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 262 def hash [name, user_fields, password_stage, captcha_stage, case_insensitive_matching, show_matched_user, enrollment_flow, recovery_flow, passwordless_flow, sources, show_source_labels, pretend_user_exists, enable_remember_me, webauthn_stage].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 196 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length < 1 invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 291 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
212 213 214 215 216 217 |
# File 'lib/authentik/api/models/identification_stage_request.rb', line 212 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @name.to_s.length < 1 true end |