Class: MistApi::PskPortalSso
- Defined in:
- lib/mist_api/models/psk_portal_sso.rb
Overview
If ‘auth`==`sso`
Instance Attribute Summary collapse
-
#allowed_roles ⇒ Array[String]
Allowed roles for accessing psk portal, if none, any role is permitted.
-
#idp_cert ⇒ String
Allowed roles for accessing psk portal, if none, any role is permitted.
-
#idp_sign_algo ⇒ PskPortalSsoIdpSignAlgoEnum
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.
-
#role_mapping ⇒ Hash[String, String]
Property key is the role name, property value is the SSO Attribute.
-
#use_sso_role_for_psk_role ⇒ TrueClass | FalseClass
If enabled, the ‘role` above will be ignored.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(allowed_roles = SKIP, idp_cert = SKIP, idp_sign_algo = PskPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, role_mapping = SKIP, use_sso_role_for_psk_role = SKIP) ⇒ PskPortalSso
constructor
A new instance of PskPortalSso.
-
#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(allowed_roles = SKIP, idp_cert = SKIP, idp_sign_algo = PskPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, role_mapping = SKIP, use_sso_role_for_psk_role = SKIP) ⇒ PskPortalSso
Returns a new instance of PskPortalSso.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 81 def initialize(allowed_roles = SKIP, idp_cert = SKIP, idp_sign_algo = PskPortalSsoIdpSignAlgoEnum::SHA256, idp_sso_url = SKIP, issuer = SKIP, nameid_format = SKIP, role_mapping = SKIP, use_sso_role_for_psk_role = SKIP) @allowed_roles = allowed_roles unless allowed_roles == 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 @role_mapping = role_mapping unless role_mapping == SKIP unless use_sso_role_for_psk_role == SKIP @use_sso_role_for_psk_role = use_sso_role_for_psk_role end end |
Instance Attribute Details
#allowed_roles ⇒ Array[String]
Allowed roles for accessing psk portal, if none, any role is permitted
14 15 16 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 14 def allowed_roles @allowed_roles end |
#idp_cert ⇒ String
Allowed roles for accessing psk portal, if none, any role is permitted
18 19 20 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 18 def idp_cert @idp_cert end |
#idp_sign_algo ⇒ PskPortalSsoIdpSignAlgoEnum
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`. enum: `sha1`, `sha256`, `sha384`, `sha512`
23 24 25 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 23 def idp_sign_algo @idp_sign_algo end |
#idp_sso_url ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`. enum: `sha1`, `sha256`, `sha384`, `sha512`
28 29 30 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 28 def idp_sso_url @idp_sso_url end |
#issuer ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`. enum: `sha1`, `sha256`, `sha384`, `sha512`
33 34 35 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 33 def issuer @issuer end |
#nameid_format ⇒ String
Signing algorithm for SAML Assertion. enum: ‘sha1`, `sha256`, `sha384`, `sha512`. enum: `sha1`, `sha256`, `sha384`, `sha512`
38 39 40 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 38 def nameid_format @nameid_format end |
#role_mapping ⇒ Hash[String, String]
Property key is the role name, property value is the SSO Attribute
42 43 44 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 42 def role_mapping @role_mapping end |
#use_sso_role_for_psk_role ⇒ TrueClass | FalseClass
If enabled, the ‘role` above will be ignored
46 47 48 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 46 def use_sso_role_for_psk_role @use_sso_role_for_psk_role end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. allowed_roles = hash.key?('allowed_roles') ? hash['allowed_roles'] : SKIP idp_cert = hash.key?('idp_cert') ? hash['idp_cert'] : SKIP idp_sign_algo = hash['idp_sign_algo'] ||= PskPortalSsoIdpSignAlgoEnum::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 role_mapping = hash.key?('role_mapping') ? hash['role_mapping'] : SKIP use_sso_role_for_psk_role = hash.key?('use_sso_role_for_psk_role') ? hash['use_sso_role_for_psk_role'] : SKIP # Create object from extracted values. PskPortalSso.new(allowed_roles, idp_cert, idp_sign_algo, idp_sso_url, issuer, nameid_format, role_mapping, use_sso_role_for_psk_role) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['allowed_roles'] = 'allowed_roles' @_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['role_mapping'] = 'role_mapping' @_hash['use_sso_role_for_psk_role'] = 'use_sso_role_for_psk_role' @_hash end |
.nullables ⇒ Object
An array for nullable fields
77 78 79 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 77 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 63 def self.optionals %w[ allowed_roles idp_cert idp_sign_algo idp_sso_url issuer nameid_format role_mapping use_sso_role_for_psk_role ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 127 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
145 146 147 148 149 150 151 152 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 145 def inspect class_name = self.class.name.split('::').last "<#{class_name} allowed_roles: #{@allowed_roles.inspect}, 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}, role_mapping:"\ " #{@role_mapping.inspect}, use_sso_role_for_psk_role:"\ " #{@use_sso_role_for_psk_role.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
136 137 138 139 140 141 142 |
# File 'lib/mist_api/models/psk_portal_sso.rb', line 136 def to_s class_name = self.class.name.split('::').last "<#{class_name} allowed_roles: #{@allowed_roles}, idp_cert: #{@idp_cert}, idp_sign_algo:"\ " #{@idp_sign_algo}, idp_sso_url: #{@idp_sso_url}, issuer: #{@issuer}, nameid_format:"\ " #{@nameid_format}, role_mapping: #{@role_mapping}, use_sso_role_for_psk_role:"\ " #{@use_sso_role_for_psk_role}>" end |