Class: OryClient::NormalizedProjectRevisionSAMLProvider

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/ory-client/models/normalized_project_revision_saml_provider.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ NormalizedProjectRevisionSAMLProvider

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {}) —

    Model attributes in the form of hash



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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 216

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::NormalizedProjectRevisionSAMLProvider` 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 `OryClient::NormalizedProjectRevisionSAMLProvider`. 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?(:'acs_url')
    self.acs_url = attributes[:'acs_url']
  end

  if attributes.key?(:'additional_acs_urls')
    if (value = attributes[:'additional_acs_urls']).is_a?(Array)
      self.additional_acs_urls = value
    end
  end

  if attributes.key?(:'allowed_digest_algorithms')
    if (value = attributes[:'allowed_digest_algorithms']).is_a?(Array)
      self.allowed_digest_algorithms = value
    end
  end

  if attributes.key?(:'allowed_name_id_formats')
    if (value = attributes[:'allowed_name_id_formats']).is_a?(Array)
      self.allowed_name_id_formats = value
    end
  end

  if attributes.key?(:'allowed_signature_algorithms')
    if (value = attributes[:'allowed_signature_algorithms']).is_a?(Array)
      self.allowed_signature_algorithms = value
    end
  end

  if attributes.key?(:'audience_override_base_url')
    self.audience_override_base_url = attributes[:'audience_override_base_url']
  end

  if attributes.key?(:'binding')
    self.binding = attributes[:'binding']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'engine')
    self.engine = attributes[:'engine']
  end

  if attributes.key?(:'force_authn')
    self.force_authn = attributes[:'force_authn']
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'idp_initiated_login_enabled')
    self. = attributes[:'idp_initiated_login_enabled']
  end

  if attributes.key?(:'idp_metadata_url')
    self. = attributes[:'idp_metadata_url']
  end

  if attributes.key?(:'label')
    self.label = attributes[:'label']
  end

  if attributes.key?(:'mapper_url')
    self.mapper_url = attributes[:'mapper_url']
  end

  if attributes.key?(:'organization_id')
    self.organization_id = attributes[:'organization_id']
  end

  if attributes.key?(:'polis_route_kind')
    self.polis_route_kind = attributes[:'polis_route_kind']
  end

  if attributes.key?(:'project_revision_id')
    self.project_revision_id = attributes[:'project_revision_id']
  end

  if attributes.key?(:'provider_id')
    self.provider_id = attributes[:'provider_id']
  end

  if attributes.key?(:'proxy_acs_url')
    self.proxy_acs_url = attributes[:'proxy_acs_url']
  end

  if attributes.key?(:'proxy_saml_audience_override')
    self.proxy_saml_audience_override = attributes[:'proxy_saml_audience_override']
  end

  if attributes.key?(:'raw_idp_metadata_xml')
    self. = attributes[:'raw_idp_metadata_xml']
  end

  if attributes.key?(:'require_encrypted_assertion')
    self.require_encrypted_assertion = attributes[:'require_encrypted_assertion']
  end

  if attributes.key?(:'sign_authn_requests')
    self.sign_authn_requests = attributes[:'sign_authn_requests']
  end

  if attributes.key?(:'sp_entity_id')
    self.sp_entity_id = attributes[:'sp_entity_id']
  end

  if attributes.key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.key?(:'update_identity_on_login')
    self. = attributes[:'update_identity_on_login']
  end

  if attributes.key?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  end

  if attributes.key?(:'valid_to')
    if (value = attributes[:'valid_to']).is_a?(Array)
      self.valid_to = value
    end
  end
end

Instance Attribute Details

#acs_url ⇒ Object

Returns the value of attribute acs_url.



18
19
20
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 18

def acs_url
  @acs_url
end

#additional_acs_urls ⇒ Object

Further ACS URLs that the provider's Polis connection accepts as the Recipient, at most 10. Polis checks them only on the provider's own ACS URL route, so they apply only to a provider with a connection-specific ACS URL. A save that leaves the field out, or sends null, keeps the provider's stored list, and an empty list removes it. A JSON Patch remove of the field removes the list, like an empty list. Switching the provider to the native engine removes its list. The onboarding portal keeps a provider's stored list.



21
22
23
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 21

def additional_acs_urls
  @additional_acs_urls
end

#allowed_digest_algorithms ⇒ Object

The digest algorithms accepted when validating signed SAML messages; empty means engine defaults (native engine only).



24
25
26
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 24

def allowed_digest_algorithms
  @allowed_digest_algorithms
end

#allowed_name_id_formats ⇒ Object

The NameID formats accepted from the IdP; empty means any (native engine only).



27
28
29
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 27

def allowed_name_id_formats
  @allowed_name_id_formats
end

#allowed_signature_algorithms ⇒ Object

The signature algorithms accepted when validating signed SAML messages; empty means engine defaults (native engine only).



30
31
32
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 30

def allowed_signature_algorithms
  @allowed_signature_algorithms
end

#audience_override_base_url ⇒ Object

Returns the value of attribute audience_override_base_url.



32
33
34
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 32

def audience_override_base_url
  @audience_override_base_url
end

#binding ⇒ Object

The SAML binding used to send authentication requests to the IdP (native engine only): "http-post" or "http-redirect". http-post SAMLBindingHTTPPost sends the AuthnRequest to the IdP via an auto-submitting HTML form. http-redirect SAMLBindingHTTPRedirect sends the AuthnRequest to the IdP via an HTTP redirect.



35
36
37
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 35

def binding
  @binding
end

#created_at ⇒ Object

The Project's Revision Creation Date



38
39
40
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 38

def created_at
  @created_at
end

#engine ⇒ Object

The SAML engine serving this provider: "jackson" (default) or "native". jackson SAMLEngineJackson routes the provider through the jackson (Polis) proxy. native SAMLEngineNative routes the provider through the native Kratos SAML engine.



41
42
43
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 41

def engine
  @engine
end

#force_authn ⇒ Object

Require the IdP to re-authenticate the subject even if it has an existing session (native engine only).



44
45
46
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 44

def force_authn
  @force_authn
end

#id ⇒ Object

Returns the value of attribute id.



46
47
48
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 46

def id
  @id
end

#idp_initiated_login_enabled ⇒ Object

IdPInitiatedLoginEnabled enables IdP-initiated login for this provider. When enabled, users can start a login from their identity provider's app launcher. The Polis connection's default redirect URL then points at the Kratos IdP-initiated login entry point instead of the SAML callback.



49
50
51
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 49

def 
  @idp_initiated_login_enabled
end

#idp_metadata_url ⇒ Object

Returns the value of attribute idp_metadata_url.



51
52
53
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 51

def 
  @idp_metadata_url
end

#label ⇒ Object

Label represents an optional label which can be used in the UI generation.



54
55
56
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 54

def label
  @label
end

#mapper_url ⇒ Object

Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider's data (e.g. GitHub or Google profile information) to hydrate the identity's data.



57
58
59
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 57

def mapper_url
  @mapper_url
end

#organization_id ⇒ Object

Returns the value of attribute organization_id.



59
60
61
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 59

def organization_id
  @organization_id
end

#polis_route_kind ⇒ Object

The ACS URL route of the provider's Polis connection: "own" for the provider's own route, /saml/api/oauth/saml/<provider_id>, or "shared" for the shared route, /saml/api/oauth/saml. Ory stores it with the connection. The field is absent while no route is stored. Values sent by clients are ignored. own PolisRouteOwn is the connection-specific ACS URL route of the provider. shared PolisRouteShared is the shared ACS URL route (/saml/api/oauth/saml).



62
63
64
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 62

def polis_route_kind
  @polis_route_kind
end

#project_revision_id ⇒ Object

The Revision's ID this schema belongs to



65
66
67
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 65

def project_revision_id
  @project_revision_id
end

#provider_id ⇒ Object

ID is the provider's ID



68
69
70
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 68

def provider_id
  @provider_id
end

#proxy_acs_url ⇒ Object

Returns the value of attribute proxy_acs_url.



70
71
72
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 70

def proxy_acs_url
  @proxy_acs_url
end

#proxy_saml_audience_override ⇒ Object

Returns the value of attribute proxy_saml_audience_override.



72
73
74
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 72

def proxy_saml_audience_override
  @proxy_saml_audience_override
end

#raw_idp_metadata_xml ⇒ Object

RawIDPMetadataXML is the raw XML metadata of the IDP.



75
76
77
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 75

def 
  @raw_idp_metadata_xml
end

#require_encrypted_assertion ⇒ Object

Reject SAML responses whose assertion is not encrypted (native engine only).



78
79
80
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 78

def require_encrypted_assertion
  @require_encrypted_assertion
end

#sign_authn_requests ⇒ Object

Sign SAML authentication requests sent to the IdP (native engine only).



81
82
83
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 81

def sign_authn_requests
  @sign_authn_requests
end

#sp_entity_id ⇒ Object

Returns the value of attribute sp_entity_id.



83
84
85
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 83

def sp_entity_id
  @sp_entity_id
end

#state ⇒ Object

State indicates the state of the provider Only providers with state enabled will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled



86
87
88
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 86

def state
  @state
end

#update_identity_on_login ⇒ Object

UpdateIdentityOnLogin controls whether the identity is updated from SAML claims on each login. Possible values are "never" (default) and "automatic". never UpdateIdentityOnLoginNever disables identity updates on login (default). automatic UpdateIdentityOnLoginAutomatic re-runs the Jsonnet claims mapper on every login and updates the identity's traits and metadata automatically.



89
90
91
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 89

def 
  @update_identity_on_login
end

#updated_at ⇒ Object

Last Time Project's Revision was Updated



92
93
94
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 92

def updated_at
  @updated_at
end

#valid_to ⇒ Object

Valid to dates of all signing certs associated with the SAML connection



95
96
97
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 95

def valid_to
  @valid_to
end

Class Method Details

.acceptable_attribute_map ⇒ Object

Returns attribute mapping this model knows about



155
156
157
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 155

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributes ⇒ Object

Returns all the JSON keys this model knows about



160
161
162
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 160

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_map ⇒ Object

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 120

def self.attribute_map
  {
    :'acs_url' => :'acs_url',
    :'additional_acs_urls' => :'additional_acs_urls',
    :'allowed_digest_algorithms' => :'allowed_digest_algorithms',
    :'allowed_name_id_formats' => :'allowed_name_id_formats',
    :'allowed_signature_algorithms' => :'allowed_signature_algorithms',
    :'audience_override_base_url' => :'audience_override_base_url',
    :'binding' => :'binding',
    :'created_at' => :'created_at',
    :'engine' => :'engine',
    :'force_authn' => :'force_authn',
    :'id' => :'id',
    :'idp_initiated_login_enabled' => :'idp_initiated_login_enabled',
    :'idp_metadata_url' => :'idp_metadata_url',
    :'label' => :'label',
    :'mapper_url' => :'mapper_url',
    :'organization_id' => :'organization_id',
    :'polis_route_kind' => :'polis_route_kind',
    :'project_revision_id' => :'project_revision_id',
    :'provider_id' => :'provider_id',
    :'proxy_acs_url' => :'proxy_acs_url',
    :'proxy_saml_audience_override' => :'proxy_saml_audience_override',
    :'raw_idp_metadata_xml' => :'raw_idp_metadata_xml',
    :'require_encrypted_assertion' => :'require_encrypted_assertion',
    :'sign_authn_requests' => :'sign_authn_requests',
    :'sp_entity_id' => :'sp_entity_id',
    :'state' => :'state',
    :'update_identity_on_login' => :'update_identity_on_login',
    :'updated_at' => :'updated_at',
    :'valid_to' => :'valid_to'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash) —

    Model attributes in the form of hash

Returns:

  • (Object) —

    Returns the model itself



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 483

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



200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 200

def self.openapi_nullable
  Set.new([
    :'acs_url',
    :'audience_override_base_url',
    :'binding',
    :'engine',
    :'idp_metadata_url',
    :'organization_id',
    :'proxy_acs_url',
    :'proxy_saml_audience_override',
    :'sp_entity_id',
  ])
end

.openapi_types ⇒ Object

Attribute type mapping.



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
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 165

def self.openapi_types
  {
    :'acs_url' => :'String',
    :'additional_acs_urls' => :'Array<String>',
    :'allowed_digest_algorithms' => :'Array<String>',
    :'allowed_name_id_formats' => :'Array<String>',
    :'allowed_signature_algorithms' => :'Array<String>',
    :'audience_override_base_url' => :'String',
    :'binding' => :'String',
    :'created_at' => :'Time',
    :'engine' => :'String',
    :'force_authn' => :'Boolean',
    :'id' => :'String',
    :'idp_initiated_login_enabled' => :'Boolean',
    :'idp_metadata_url' => :'String',
    :'label' => :'String',
    :'mapper_url' => :'String',
    :'organization_id' => :'String',
    :'polis_route_kind' => :'String',
    :'project_revision_id' => :'String',
    :'provider_id' => :'String',
    :'proxy_acs_url' => :'String',
    :'proxy_saml_audience_override' => :'String',
    :'raw_idp_metadata_xml' => :'String',
    :'require_encrypted_assertion' => :'Boolean',
    :'sign_authn_requests' => :'Boolean',
    :'sp_entity_id' => :'String',
    :'state' => :'String',
    :'update_identity_on_login' => :'String',
    :'updated_at' => :'Time',
    :'valid_to' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object) —

    to be compared



434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 434

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      acs_url == o.acs_url &&
      additional_acs_urls == o.additional_acs_urls &&
      allowed_digest_algorithms == o.allowed_digest_algorithms &&
      allowed_name_id_formats == o.allowed_name_id_formats &&
      allowed_signature_algorithms == o.allowed_signature_algorithms &&
      audience_override_base_url == o.audience_override_base_url &&
      binding == o.binding &&
      created_at == o.created_at &&
      engine == o.engine &&
      force_authn == o.force_authn &&
      id == o.id &&
       == o. &&
       == o. &&
      label == o.label &&
      mapper_url == o.mapper_url &&
      organization_id == o.organization_id &&
      polis_route_kind == o.polis_route_kind &&
      project_revision_id == o.project_revision_id &&
      provider_id == o.provider_id &&
      proxy_acs_url == o.proxy_acs_url &&
      proxy_saml_audience_override == o.proxy_saml_audience_override &&
       == o. &&
      require_encrypted_assertion == o.require_encrypted_assertion &&
      sign_authn_requests == o.sign_authn_requests &&
      sp_entity_id == o.sp_entity_id &&
      state == o.state &&
       == o. &&
      updated_at == o.updated_at &&
      valid_to == o.valid_to
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object) —

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


470
471
472
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 470

def eql?(o)
  self == o
end

#hash ⇒ Integer

Calculates hash code according to all attributes.

Returns:

  • (Integer) —

    Hash code



476
477
478
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 476

def hash
  [acs_url, additional_acs_urls, allowed_digest_algorithms, allowed_name_id_formats, allowed_signature_algorithms, audience_override_base_url, binding, created_at, engine, force_authn, id, , , label, mapper_url, organization_id, polis_route_kind, project_revision_id, provider_id, proxy_acs_url, proxy_saml_audience_override, , require_encrypted_assertion, sign_authn_requests, sp_entity_id, state, , updated_at, valid_to].hash
end

#list_invalid_properties ⇒ Object

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



359
360
361
362
363
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 359

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hash ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash) —

    Returns the object in the form of hash



505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 505

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

Returns:

  • (Boolean) —

    true if the model is valid



367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 367

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  binding_validator = EnumAttributeValidator.new('String', ["http-post", "http-redirect"])
  return false unless binding_validator.valid?(@binding)
  engine_validator = EnumAttributeValidator.new('String', ["jackson", "native"])
  return false unless engine_validator.valid?(@engine)
  polis_route_kind_validator = EnumAttributeValidator.new('String', ["own", "shared"])
  return false unless polis_route_kind_validator.valid?(@polis_route_kind)
  state_validator = EnumAttributeValidator.new('String', ["enabled", "disabled"])
  return false unless state_validator.valid?(@state)
   = EnumAttributeValidator.new('String', ["never", "automatic"])
  return false unless .valid?(@update_identity_on_login)
  true
end