Class: MistApi::NacPortalSso
- Defined in:
- lib/mist_api/models/nac_portal_sso.rb
Overview
NacPortalSso Model.
Instance Attribute Summary collapse
-
#idp_cert ⇒ String
TODO: Write general description for this method.
-
#idp_sign_algo ⇒ NacPortalSsoIdpSignAlgoEnum
Signing algorithm for SAML Assertion.
-
#idp_sso_url ⇒ String
Signing algorithm for SAML Assertion.
-
#issuer ⇒ String
Signing algorithm for SAML Assertion.
-
#nameid_format ⇒ String
Signing algorithm for SAML Assertion.
-
#sso_role_matching ⇒ Array[NacPortalSsoRoleMatching]
Signing algorithm for SAML Assertion.
-
#use_sso_role_for_cert ⇒ TrueClass | FalseClass
If it’s desired to inject a role into Cert’s Subject (so it can be used later on in policy).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(idp_cert = SKIP, idp_sign_algo = NacPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, sso_role_matching = SKIP, use_sso_role_for_cert = SKIP) ⇒ NacPortalSso
constructor
A new instance of NacPortalSso.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(idp_cert = SKIP, idp_sign_algo = NacPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, sso_role_matching = SKIP, use_sso_role_for_cert = SKIP) ⇒ NacPortalSso
Returns a new instance of NacPortalSso.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 77 def initialize(idp_cert = SKIP, idp_sign_algo = NacPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, sso_role_matching = SKIP, use_sso_role_for_cert = SKIP) @idp_cert = idp_cert unless idp_cert == SKIP @idp_sign_algo = idp_sign_algo unless idp_sign_algo == SKIP @idp_sso_url = idp_sso_url unless idp_sso_url == SKIP @issuer = issuer unless issuer == SKIP @nameid_format = nameid_format unless nameid_format == SKIP @sso_role_matching = sso_role_matching unless sso_role_matching == SKIP @use_sso_role_for_cert = use_sso_role_for_cert unless use_sso_role_for_cert == SKIP end |
Instance Attribute Details
#idp_cert ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 14 def idp_cert @idp_cert end |
#idp_sign_algo ⇒ NacPortalSsoIdpSignAlgoEnum
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`.
19 20 21 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 19 def idp_sign_algo @idp_sign_algo end |
#idp_sso_url ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`.
24 25 26 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 24 def idp_sso_url @idp_sso_url end |
#issuer ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`.
29 30 31 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 29 def issuer @issuer end |
#nameid_format ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`.
34 35 36 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 34 def nameid_format @nameid_format end |
#sso_role_matching ⇒ Array[NacPortalSsoRoleMatching]
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`.
39 40 41 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 39 def sso_role_matching @sso_role_matching end |
#use_sso_role_for_cert ⇒ TrueClass | FalseClass
If it’s desired to inject a role into Cert’s Subject (so it can be used later on in policy)
44 45 46 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 44 def use_sso_role_for_cert @use_sso_role_for_cert end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. idp_cert = hash.key?('idp_cert') ? hash['idp_cert'] : SKIP idp_sign_algo = hash['idp_sign_algo'] ||= NacPortalSsoIdpSignAlgoEnum::SHA256 idp_sso_url = hash.key?('idp_sso_url') ? hash['idp_sso_url'] : SKIP issuer = hash.key?('issuer') ? hash['issuer'] : SKIP nameid_format = hash.key?('nameid_format') ? hash['nameid_format'] : SKIP # Parameter is an array, so we need to iterate through it sso_role_matching = nil unless hash['sso_role_matching'].nil? sso_role_matching = [] hash['sso_role_matching'].each do |structure| sso_role_matching << (NacPortalSsoRoleMatching.from_hash(structure) if structure) end end sso_role_matching = SKIP unless hash.key?('sso_role_matching') use_sso_role_for_cert = hash.key?('use_sso_role_for_cert') ? hash['use_sso_role_for_cert'] : SKIP # Create object from extracted values. NacPortalSso.new(idp_cert, idp_sign_algo, idp_sso_url, issuer, nameid_format, sso_role_matching, use_sso_role_for_cert) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['idp_cert'] = 'idp_cert' @_hash['idp_sign_algo'] = 'idp_sign_algo' @_hash['idp_sso_url'] = 'idp_sso_url' @_hash['issuer'] = 'issuer' @_hash['nameid_format'] = 'nameid_format' @_hash['sso_role_matching'] = 'sso_role_matching' @_hash['use_sso_role_for_cert'] = 'use_sso_role_for_cert' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 73 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 60 def self.optionals %w[ idp_cert idp_sign_algo idp_sso_url issuer nameid_format sso_role_matching use_sso_role_for_cert ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
133 134 135 136 137 138 139 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 133 def inspect class_name = self.class.name.split('::').last "<#{class_name} idp_cert: #{@idp_cert.inspect}, idp_sign_algo: #{@idp_sign_algo.inspect},"\ " idp_sso_url: #{@idp_sso_url.inspect}, issuer: #{@issuer.inspect}, nameid_format:"\ " #{@nameid_format.inspect}, sso_role_matching: #{@sso_role_matching.inspect},"\ " use_sso_role_for_cert: #{@use_sso_role_for_cert.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
125 126 127 128 129 130 |
# File 'lib/mist_api/models/nac_portal_sso.rb', line 125 def to_s class_name = self.class.name.split('::').last "<#{class_name} idp_cert: #{@idp_cert}, idp_sign_algo: #{@idp_sign_algo}, idp_sso_url:"\ " #{@idp_sso_url}, issuer: #{@issuer}, nameid_format: #{@nameid_format}, sso_role_matching:"\ " #{@sso_role_matching}, use_sso_role_for_cert: #{@use_sso_role_for_cert}>" end |