Class: Authentik::Api::SAMLNameIDPolicyEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/authentik/api/models/saml_name_id_policy_enum.rb

Constant Summary collapse

URN_OASIS_NAMES_TC_SAML_1_1_NAMEID_FORMAT_EMAIL_ADDRESS =
"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress".freeze
URN_OASIS_NAMES_TC_SAML_2_0_NAMEID_FORMAT_PERSISTENT =
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent".freeze
URN_OASIS_NAMES_TC_SAML_1_1_NAMEID_FORMAT_X509_SUBJECT_NAME =
"urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName".freeze
URN_OASIS_NAMES_TC_SAML_2_0_NAMEID_FORMAT_WINDOWS_DOMAIN_QUALIFIED_NAME =
"urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName".freeze
URN_OASIS_NAMES_TC_SAML_2_0_NAMEID_FORMAT_TRANSIENT =
"urn:oasis:names:tc:SAML:2.0:nameid-format:transient".freeze
URN_OASIS_NAMES_TC_SAML_1_1_NAMEID_FORMAT_UNSPECIFIED =
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



26
27
28
# File 'lib/authentik/api/models/saml_name_id_policy_enum.rb', line 26

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



33
34
35
36
# File 'lib/authentik/api/models/saml_name_id_policy_enum.rb', line 33

def build_from_hash(value)
  return value if SAMLNameIDPolicyEnum.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #SAMLNameIDPolicyEnum"
end