Exception: SAML::UserAttributeError

Inherits:
SAMLError
  • Object
show all
Defined in:
lib/saml/errors.rb

Constant Summary collapse

MULTIPLE_MHV_IDS_CODE =
'101'
MULTIPLE_EDIPIS_CODE =
'102'
MHV_ICN_MISMATCH_CODE =
'103'
UUID_MISSING_CODE =
'104'
MULTPLE_CORP_IDS_CODE =
'106'
MHV_UNVERIFIED_BLOCKED_CODE =
'108'
ERRORS =
{
  multiple_mhv_ids: { code: MULTIPLE_MHV_IDS_CODE,
                      tag: :multiple_mhv_ids,
                      message: 'User attributes contain multiple distinct MHV ID values' }.freeze,
  multiple_edipis: { code: MULTIPLE_EDIPIS_CODE,
                     tag: :multiple_edipis,
                     message: 'User attributes contain multiple distinct EDIPI values' }.freeze,
  mhv_icn_mismatch: { code: MHV_ICN_MISMATCH_CODE,
                      tag: :mhv_icn_mismatch,
                      message: 'MHV credential ICN does not match MPI record' }.freeze,
  uuid_missing: { code: UUID_MISSING_CODE,
                  tag: :uuid_missing,
                  message: 'User attributes is missing an ID.me and Login.gov UUID' }.freeze,
  multiple_corp_ids: { code: MULTPLE_CORP_IDS_CODE,
                       tag: :multiple_corp_ids,
                       message: 'User attributes contain multiple distinct CORP ID values' }.freeze,
  mhv_unverified_blocked: { code: MHV_UNVERIFIED_BLOCKED_CODE,
                            tag: :mhv_unverified_blocked,
                            message: 'MHV account is unverified for context requiring verified account' }.freeze
}.freeze

Instance Attribute Summary collapse

Attributes inherited from SAMLError

#code, #context, #level, #tag

Instance Method Summary collapse

Constructor Details

#initialize(message:, code:, tag:, identifier: nil) ⇒ UserAttributeError

Returns a new instance of UserAttributeError.



39
40
41
42
43
44
45
46
# File 'lib/saml/errors.rb', line 39

def initialize(message:, code:, tag:, identifier: nil)
  @code = code
  @tag = tag
  @level = :warning
  @context = {}
  @identifier = identifier
  super(message)
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



37
38
39
# File 'lib/saml/errors.rb', line 37

def identifier
  @identifier
end