Class: Authentik::Api::PatchedLDAPProviderRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::PatchedLDAPProviderRequest
- Defined in:
- lib/authentik/api/models/patched_ldap_provider_request.rb
Overview
LDAPProvider Serializer
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authentication_flow ⇒ Object
Flow used for authentication when the associated application is accessed by an un-authenticated user.
-
#authorization_flow ⇒ Object
Flow used when authorizing this provider.
-
#base_dn ⇒ Object
DN under which objects are accessible.
-
#bind_mode ⇒ Object
Returns the value of attribute bind_mode.
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#gid_start_number ⇒ Object
The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren’t too low for POSIX groups.
-
#invalidation_flow ⇒ Object
Flow used ending the session from a provider.
-
#mfa_support ⇒ Object
When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password.
-
#name ⇒ Object
Returns the value of attribute name.
-
#property_mappings ⇒ Object
Returns the value of attribute property_mappings.
-
#search_mode ⇒ Object
Returns the value of attribute search_mode.
-
#tls_server_name ⇒ Object
Returns the value of attribute tls_server_name.
-
#uid_start_number ⇒ Object
The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren’t too low for POSIX users.
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 = {}) ⇒ PatchedLDAPProviderRequest
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 = {}) ⇒ PatchedLDAPProviderRequest
Initializes the object
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 193 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 126 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::PatchedLDAPProviderRequest` 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::PatchedLDAPProviderRequest`. 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'] end if attributes.key?(:'authentication_flow') self.authentication_flow = attributes[:'authentication_flow'] end if attributes.key?(:'authorization_flow') self. = attributes[:'authorization_flow'] end if attributes.key?(:'invalidation_flow') self.invalidation_flow = attributes[:'invalidation_flow'] end if attributes.key?(:'property_mappings') if (value = attributes[:'property_mappings']).is_a?(Array) self.property_mappings = value end end if attributes.key?(:'base_dn') self.base_dn = attributes[:'base_dn'] end if attributes.key?(:'certificate') self.certificate = attributes[:'certificate'] end if attributes.key?(:'tls_server_name') self.tls_server_name = attributes[:'tls_server_name'] end if attributes.key?(:'uid_start_number') self.uid_start_number = attributes[:'uid_start_number'] end if attributes.key?(:'gid_start_number') self.gid_start_number = attributes[:'gid_start_number'] end if attributes.key?(:'search_mode') self.search_mode = attributes[:'search_mode'] end if attributes.key?(:'bind_mode') self.bind_mode = attributes[:'bind_mode'] end if attributes.key?(:'mfa_support') self.mfa_support = attributes[:'mfa_support'] end end |
Instance Attribute Details
#authentication_flow ⇒ Object
Flow used for authentication when the associated application is accessed by an un-authenticated user.
16 17 18 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 16 def authentication_flow @authentication_flow end |
#authorization_flow ⇒ Object
Flow used when authorizing this provider.
19 20 21 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 19 def @authorization_flow end |
#base_dn ⇒ Object
DN under which objects are accessible.
27 28 29 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 27 def base_dn @base_dn end |
#bind_mode ⇒ Object
Returns the value of attribute bind_mode.
41 42 43 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 41 def bind_mode @bind_mode end |
#certificate ⇒ Object
Returns the value of attribute certificate.
29 30 31 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 29 def certificate @certificate end |
#gid_start_number ⇒ Object
The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren’t too low for POSIX groups. Default is 4000 to ensure that we don’t collide with local groups or users primary groups gidNumber
37 38 39 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 37 def gid_start_number @gid_start_number end |
#invalidation_flow ⇒ Object
Flow used ending the session from a provider.
22 23 24 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 22 def invalidation_flow @invalidation_flow end |
#mfa_support ⇒ Object
When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.
44 45 46 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 44 def mfa_support @mfa_support end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 13 def name @name end |
#property_mappings ⇒ Object
Returns the value of attribute property_mappings.
24 25 26 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 24 def property_mappings @property_mappings end |
#search_mode ⇒ Object
Returns the value of attribute search_mode.
39 40 41 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 39 def search_mode @search_mode end |
#tls_server_name ⇒ Object
Returns the value of attribute tls_server_name.
31 32 33 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 31 def tls_server_name @tls_server_name end |
#uid_start_number ⇒ Object
The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren’t too low for POSIX users. Default is 2000 to ensure that we don’t collide with local users uidNumber
34 35 36 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 34 def uid_start_number @uid_start_number end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
88 89 90 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 88 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
93 94 95 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 93 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 69 def self.attribute_map { :'name' => :'name', :'authentication_flow' => :'authentication_flow', :'authorization_flow' => :'authorization_flow', :'invalidation_flow' => :'invalidation_flow', :'property_mappings' => :'property_mappings', :'base_dn' => :'base_dn', :'certificate' => :'certificate', :'tls_server_name' => :'tls_server_name', :'uid_start_number' => :'uid_start_number', :'gid_start_number' => :'gid_start_number', :'search_mode' => :'search_mode', :'bind_mode' => :'bind_mode', :'mfa_support' => :'mfa_support' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 339 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
117 118 119 120 121 122 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 117 def self.openapi_nullable Set.new([ :'authentication_flow', :'certificate', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 98 def self.openapi_types { :'name' => :'String', :'authentication_flow' => :'String', :'authorization_flow' => :'String', :'invalidation_flow' => :'String', :'property_mappings' => :'Array<String>', :'base_dn' => :'String', :'certificate' => :'String', :'tls_server_name' => :'String', :'uid_start_number' => :'Integer', :'gid_start_number' => :'Integer', :'search_mode' => :'LDAPAPIAccessMode', :'bind_mode' => :'LDAPAPIAccessMode', :'mfa_support' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 306 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && authentication_flow == o.authentication_flow && == o. && invalidation_flow == o.invalidation_flow && property_mappings == o.property_mappings && base_dn == o.base_dn && certificate == o.certificate && tls_server_name == o.tls_server_name && uid_start_number == o.uid_start_number && gid_start_number == o.gid_start_number && search_mode == o.search_mode && bind_mode == o.bind_mode && mfa_support == o.mfa_support end |
#eql?(o) ⇒ Boolean
326 327 328 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 326 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
332 333 334 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 332 def hash [name, authentication_flow, , invalidation_flow, property_mappings, base_dn, certificate, tls_server_name, uid_start_number, gid_start_number, search_mode, bind_mode, mfa_support].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 197 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@name.nil? && @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 !@base_dn.nil? && @base_dn.to_s.length < 1 invalid_properties.push('invalid value for "base_dn", the character length must be greater than or equal to 1.') end if !@uid_start_number.nil? && @uid_start_number > 2147483647 invalid_properties.push('invalid value for "uid_start_number", must be smaller than or equal to 2147483647.') end if !@uid_start_number.nil? && @uid_start_number < -2147483648 invalid_properties.push('invalid value for "uid_start_number", must be greater than or equal to -2147483648.') end if !@gid_start_number.nil? && @gid_start_number > 2147483647 invalid_properties.push('invalid value for "gid_start_number", must be smaller than or equal to 2147483647.') end if !@gid_start_number.nil? && @gid_start_number < -2147483648 invalid_properties.push('invalid value for "gid_start_number", must be greater than or equal to -2147483648.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 361 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
229 230 231 232 233 234 235 236 237 238 |
# File 'lib/authentik/api/models/patched_ldap_provider_request.rb', line 229 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@name.nil? && @name.to_s.length < 1 return false if !@base_dn.nil? && @base_dn.to_s.length < 1 return false if !@uid_start_number.nil? && @uid_start_number > 2147483647 return false if !@uid_start_number.nil? && @uid_start_number < -2147483648 return false if !@gid_start_number.nil? && @gid_start_number > 2147483647 return false if !@gid_start_number.nil? && @gid_start_number < -2147483648 true end |