Class: Authentik::Api::SAMLSourceRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::SAMLSourceRequest
- Defined in:
- lib/authentik/api/models/saml_source_request.rb
Overview
SAMLSource Serializer
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_idp_initiated ⇒ Object
Allows authentication flows initiated by the IdP.
-
#authentication_flow ⇒ Object
Flow to use when authenticating existing users.
-
#binding_type ⇒ Object
Returns the value of attribute binding_type.
-
#digest_algorithm ⇒ Object
Returns the value of attribute digest_algorithm.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#encryption_kp ⇒ Object
When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair.
-
#enrollment_flow ⇒ Object
Flow to use when enrolling new users.
-
#group_matching_mode ⇒ Object
How the source determines if an existing group should be used or a new group created.
-
#group_property_mappings ⇒ Object
Returns the value of attribute group_property_mappings.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#issuer ⇒ Object
Also known as Entity ID.
-
#name ⇒ Object
Source’s display Name.
-
#name_id_policy ⇒ Object
NameID Policy sent to the IdP.
-
#policy_engine_mode ⇒ Object
Returns the value of attribute policy_engine_mode.
-
#pre_authentication_flow ⇒ Object
Flow used before authentication.
-
#promoted ⇒ Object
When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
-
#signature_algorithm ⇒ Object
Returns the value of attribute signature_algorithm.
-
#signed_assertion ⇒ Object
Returns the value of attribute signed_assertion.
-
#signed_response ⇒ Object
Returns the value of attribute signed_response.
-
#signing_kp ⇒ Object
Keypair used to sign outgoing Responses going to the Identity Provider.
-
#slo_url ⇒ Object
Optional URL if your IDP supports Single-Logout.
-
#slug ⇒ Object
Internal source name, used in URLs.
-
#sso_url ⇒ Object
URL that the initial Login request is sent to.
-
#temporary_user_delete_after ⇒ Object
Time offset when temporary users should be deleted.
-
#user_matching_mode ⇒ Object
How the source determines if an existing user should be authenticated or a new user enrolled.
-
#user_path_template ⇒ Object
Returns the value of attribute user_path_template.
-
#user_property_mappings ⇒ Object
Returns the value of attribute user_property_mappings.
-
#verification_kp ⇒ Object
When selected, incoming assertion’s Signatures will be validated against this certificate.
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 = {}) ⇒ SAMLSourceRequest
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 = {}) ⇒ SAMLSourceRequest
Initializes the object
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 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 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 200 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::SAMLSourceRequest` 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::SAMLSourceRequest`. 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?(:'slug') self.slug = attributes[:'slug'] else self.slug = nil end if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end if attributes.key?(:'promoted') self.promoted = attributes[:'promoted'] end if attributes.key?(:'authentication_flow') self.authentication_flow = attributes[:'authentication_flow'] end if attributes.key?(:'enrollment_flow') self.enrollment_flow = attributes[:'enrollment_flow'] end if attributes.key?(:'user_property_mappings') if (value = attributes[:'user_property_mappings']).is_a?(Array) self.user_property_mappings = value end end if attributes.key?(:'group_property_mappings') if (value = attributes[:'group_property_mappings']).is_a?(Array) self.group_property_mappings = value end end if attributes.key?(:'policy_engine_mode') self.policy_engine_mode = attributes[:'policy_engine_mode'] end if attributes.key?(:'user_matching_mode') self.user_matching_mode = attributes[:'user_matching_mode'] end if attributes.key?(:'user_path_template') self.user_path_template = attributes[:'user_path_template'] end if attributes.key?(:'icon') self.icon = attributes[:'icon'] end if attributes.key?(:'group_matching_mode') self.group_matching_mode = attributes[:'group_matching_mode'] end if attributes.key?(:'pre_authentication_flow') self.pre_authentication_flow = attributes[:'pre_authentication_flow'] else self.pre_authentication_flow = nil end if attributes.key?(:'issuer') self.issuer = attributes[:'issuer'] end if attributes.key?(:'sso_url') self.sso_url = attributes[:'sso_url'] else self.sso_url = nil end if attributes.key?(:'slo_url') self.slo_url = attributes[:'slo_url'] end if attributes.key?(:'allow_idp_initiated') self.allow_idp_initiated = attributes[:'allow_idp_initiated'] end if attributes.key?(:'name_id_policy') self.name_id_policy = attributes[:'name_id_policy'] end if attributes.key?(:'binding_type') self.binding_type = attributes[:'binding_type'] end if attributes.key?(:'verification_kp') self.verification_kp = attributes[:'verification_kp'] end if attributes.key?(:'signing_kp') self.signing_kp = attributes[:'signing_kp'] end if attributes.key?(:'digest_algorithm') self.digest_algorithm = attributes[:'digest_algorithm'] end if attributes.key?(:'signature_algorithm') self.signature_algorithm = attributes[:'signature_algorithm'] end if attributes.key?(:'temporary_user_delete_after') self.temporary_user_delete_after = attributes[:'temporary_user_delete_after'] end if attributes.key?(:'encryption_kp') self.encryption_kp = attributes[:'encryption_kp'] end if attributes.key?(:'signed_assertion') self.signed_assertion = attributes[:'signed_assertion'] end if attributes.key?(:'signed_response') self.signed_response = attributes[:'signed_response'] end end |
Instance Attribute Details
#allow_idp_initiated ⇒ Object
Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done.
59 60 61 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 59 def allow_idp_initiated @allow_idp_initiated end |
#authentication_flow ⇒ Object
Flow to use when authenticating existing users.
25 26 27 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 25 def authentication_flow @authentication_flow end |
#binding_type ⇒ Object
Returns the value of attribute binding_type.
64 65 66 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 64 def binding_type @binding_type end |
#digest_algorithm ⇒ Object
Returns the value of attribute digest_algorithm.
72 73 74 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 72 def digest_algorithm @digest_algorithm end |
#enabled ⇒ Object
Returns the value of attribute enabled.
19 20 21 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 19 def enabled @enabled end |
#encryption_kp ⇒ Object
When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key.
80 81 82 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 80 def encryption_kp @encryption_kp end |
#enrollment_flow ⇒ Object
Flow to use when enrolling new users.
28 29 30 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 28 def enrollment_flow @enrollment_flow end |
#group_matching_mode ⇒ Object
How the source determines if an existing group should be used or a new group created.
44 45 46 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 44 def group_matching_mode @group_matching_mode end |
#group_property_mappings ⇒ Object
Returns the value of attribute group_property_mappings.
32 33 34 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 32 def group_property_mappings @group_property_mappings end |
#icon ⇒ Object
Returns the value of attribute icon.
41 42 43 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 41 def icon @icon end |
#issuer ⇒ Object
Also known as Entity ID. Defaults the Metadata URL.
50 51 52 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 50 def issuer @issuer end |
#name ⇒ Object
Source’s display Name.
14 15 16 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 14 def name @name end |
#name_id_policy ⇒ Object
NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent.
62 63 64 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 62 def name_id_policy @name_id_policy end |
#policy_engine_mode ⇒ Object
Returns the value of attribute policy_engine_mode.
34 35 36 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 34 def policy_engine_mode @policy_engine_mode end |
#pre_authentication_flow ⇒ Object
Flow used before authentication.
47 48 49 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 47 def pre_authentication_flow @pre_authentication_flow end |
#promoted ⇒ Object
When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
22 23 24 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 22 def promoted @promoted end |
#signature_algorithm ⇒ Object
Returns the value of attribute signature_algorithm.
74 75 76 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 74 def signature_algorithm @signature_algorithm end |
#signed_assertion ⇒ Object
Returns the value of attribute signed_assertion.
82 83 84 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 82 def signed_assertion @signed_assertion end |
#signed_response ⇒ Object
Returns the value of attribute signed_response.
84 85 86 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 84 def signed_response @signed_response end |
#signing_kp ⇒ Object
Keypair used to sign outgoing Responses going to the Identity Provider.
70 71 72 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 70 def signing_kp @signing_kp end |
#slo_url ⇒ Object
Optional URL if your IDP supports Single-Logout.
56 57 58 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 56 def slo_url @slo_url end |
#slug ⇒ Object
Internal source name, used in URLs.
17 18 19 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 17 def slug @slug end |
#sso_url ⇒ Object
URL that the initial Login request is sent to.
53 54 55 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 53 def sso_url @sso_url end |
#temporary_user_delete_after ⇒ Object
Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format ‘transient’, and the user doesn’t log out manually. (Format: hours=1;minutes=2;seconds=3).
77 78 79 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 77 def temporary_user_delete_after @temporary_user_delete_after end |
#user_matching_mode ⇒ Object
How the source determines if an existing user should be authenticated or a new user enrolled.
37 38 39 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 37 def user_matching_mode @user_matching_mode end |
#user_path_template ⇒ Object
Returns the value of attribute user_path_template.
39 40 41 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 39 def user_path_template @user_path_template end |
#user_property_mappings ⇒ Object
Returns the value of attribute user_property_mappings.
30 31 32 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 30 def user_property_mappings @user_property_mappings end |
#verification_kp ⇒ Object
When selected, incoming assertion’s Signatures will be validated against this certificate. To allow unsigned Requests, leave on default.
67 68 69 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 67 def verification_kp @verification_kp end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
143 144 145 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 143 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
148 149 150 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 148 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 109 def self.attribute_map { :'name' => :'name', :'slug' => :'slug', :'enabled' => :'enabled', :'promoted' => :'promoted', :'authentication_flow' => :'authentication_flow', :'enrollment_flow' => :'enrollment_flow', :'user_property_mappings' => :'user_property_mappings', :'group_property_mappings' => :'group_property_mappings', :'policy_engine_mode' => :'policy_engine_mode', :'user_matching_mode' => :'user_matching_mode', :'user_path_template' => :'user_path_template', :'icon' => :'icon', :'group_matching_mode' => :'group_matching_mode', :'pre_authentication_flow' => :'pre_authentication_flow', :'issuer' => :'issuer', :'sso_url' => :'sso_url', :'slo_url' => :'slo_url', :'allow_idp_initiated' => :'allow_idp_initiated', :'name_id_policy' => :'name_id_policy', :'binding_type' => :'binding_type', :'verification_kp' => :'verification_kp', :'signing_kp' => :'signing_kp', :'digest_algorithm' => :'digest_algorithm', :'signature_algorithm' => :'signature_algorithm', :'temporary_user_delete_after' => :'temporary_user_delete_after', :'encryption_kp' => :'encryption_kp', :'signed_assertion' => :'signed_assertion', :'signed_response' => :'signed_response' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 540 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
187 188 189 190 191 192 193 194 195 196 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 187 def self.openapi_nullable Set.new([ :'authentication_flow', :'enrollment_flow', :'slo_url', :'verification_kp', :'signing_kp', :'encryption_kp', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 153 def self.openapi_types { :'name' => :'String', :'slug' => :'String', :'enabled' => :'Boolean', :'promoted' => :'Boolean', :'authentication_flow' => :'String', :'enrollment_flow' => :'String', :'user_property_mappings' => :'Array<String>', :'group_property_mappings' => :'Array<String>', :'policy_engine_mode' => :'PolicyEngineMode', :'user_matching_mode' => :'UserMatchingModeEnum', :'user_path_template' => :'String', :'icon' => :'String', :'group_matching_mode' => :'GroupMatchingModeEnum', :'pre_authentication_flow' => :'String', :'issuer' => :'String', :'sso_url' => :'String', :'slo_url' => :'String', :'allow_idp_initiated' => :'Boolean', :'name_id_policy' => :'SAMLNameIDPolicyEnum', :'binding_type' => :'BindingTypeEnum', :'verification_kp' => :'String', :'signing_kp' => :'String', :'digest_algorithm' => :'DigestAlgorithmEnum', :'signature_algorithm' => :'SignatureAlgorithmEnum', :'temporary_user_delete_after' => :'String', :'encryption_kp' => :'String', :'signed_assertion' => :'Boolean', :'signed_response' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 492 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && slug == o.slug && enabled == o.enabled && promoted == o.promoted && authentication_flow == o.authentication_flow && enrollment_flow == o.enrollment_flow && user_property_mappings == o.user_property_mappings && group_property_mappings == o.group_property_mappings && policy_engine_mode == o.policy_engine_mode && user_matching_mode == o.user_matching_mode && user_path_template == o.user_path_template && icon == o.icon && group_matching_mode == o.group_matching_mode && pre_authentication_flow == o.pre_authentication_flow && issuer == o.issuer && sso_url == o.sso_url && slo_url == o.slo_url && allow_idp_initiated == o.allow_idp_initiated && name_id_policy == o.name_id_policy && binding_type == o.binding_type && verification_kp == o.verification_kp && signing_kp == o.signing_kp && digest_algorithm == o.digest_algorithm && signature_algorithm == o.signature_algorithm && temporary_user_delete_after == o.temporary_user_delete_after && encryption_kp == o.encryption_kp && signed_assertion == o.signed_assertion && signed_response == o.signed_response end |
#eql?(o) ⇒ Boolean
527 528 529 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 527 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
533 534 535 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 533 def hash [name, slug, enabled, promoted, authentication_flow, enrollment_flow, user_property_mappings, group_property_mappings, policy_engine_mode, user_matching_mode, user_path_template, icon, group_matching_mode, pre_authentication_flow, issuer, sso_url, slo_url, allow_idp_initiated, name_id_policy, binding_type, verification_kp, signing_kp, digest_algorithm, signature_algorithm, temporary_user_delete_after, encryption_kp, signed_assertion, signed_response].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 341 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 if @slug.nil? invalid_properties.push('invalid value for "slug", slug cannot be nil.') end if @slug.to_s.length < 1 invalid_properties.push('invalid value for "slug", the character length must be greater than or equal to 1.') end pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/) if @slug !~ pattern invalid_properties.push("invalid value for \"slug\", must conform to the pattern #{pattern}.") end if !@user_path_template.nil? && @user_path_template.to_s.length < 1 invalid_properties.push('invalid value for "user_path_template", the character length must be greater than or equal to 1.') end if @pre_authentication_flow.nil? invalid_properties.push('invalid value for "pre_authentication_flow", pre_authentication_flow cannot be nil.') end if @sso_url.nil? invalid_properties.push('invalid value for "sso_url", sso_url cannot be nil.') end if @sso_url.to_s.length < 1 invalid_properties.push('invalid value for "sso_url", the character length must be greater than or equal to 1.') end if !@temporary_user_delete_after.nil? && @temporary_user_delete_after.to_s.length < 1 invalid_properties.push('invalid value for "temporary_user_delete_after", 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
562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 562 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
390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/authentik/api/models/saml_source_request.rb', line 390 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @name.to_s.length < 1 return false if @slug.nil? return false if @slug.to_s.length < 1 return false if @slug !~ Regexp.new(/^[-a-zA-Z0-9_]+$/) return false if !@user_path_template.nil? && @user_path_template.to_s.length < 1 return false if @pre_authentication_flow.nil? return false if @sso_url.nil? return false if @sso_url.to_s.length < 1 return false if !@temporary_user_delete_after.nil? && @temporary_user_delete_after.to_s.length < 1 true end |