Class: SAML::Responses::Login

Inherits:
OneLogin::RubySaml::Response
  • Object
show all
Includes:
Base
Defined in:
lib/saml/responses/login.rb

Constant Summary

Constants included from Base

Base::AUTH_TOO_EARLY_ERROR_CODE, Base::AUTH_TOO_LATE_ERROR_CODE, Base::CLICKED_DENY_ERROR_CODE, Base::ERRORS, Base::UNKNOWN_OR_BLANK_ERROR_CODE

Instance Method Summary collapse

Methods included from Base

#authn_context, #authn_context_text, #error_code, #error_instrumentation_code, #errors_context, #errors_hash, #issuer_text, #map_message_to_error, #normalized_errors, #valid?

Instance Method Details

#errors_messageObject



10
11
12
13
14
15
16
17
# File 'lib/saml/responses/login.rb', line 10

def errors_message
  @errors_message ||= if errors.any?
                        message = 'Login Failed! '
                        message += errors_hash[:short_message]
                        message += ' Multiple SAML Errors' if normalized_errors.count > 1
                        message
                      end
end

#status_detailObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/saml/responses/login.rb', line 19

def status_detail
  @status_detail ||= begin
    node = REXML::XPath.first(
      decrypted_document || document,
      '/p:Response/p:Status/p:StatusDetail',
      { 'p' => PROTOCOL }
    )
    node&.each_element_with_text&.join(', ')
  end
end