Sha256: b246c2bb0144ea80f233a17cc0d4912ade447c9abe95817c4b7f03d9cca14b33
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
module Saml module Kit module Respondable extend ActiveSupport::Concern attr_reader :request_id included do validates_inclusion_of :status_code, in: [Namespaces::SUCCESS] validate :must_match_request_id end # @!visibility private def query_string_parameter 'SAMLResponse' end # Returns the /Status/StatusCode@Value def status_code to_h.fetch(name, {}).fetch('Status', {}).fetch('StatusCode', {}).fetch('Value', nil) end # Returns the /InResponseTo attribute. def in_response_to to_h.fetch(name, {}).fetch('InResponseTo', nil) end # Returns true if the Status code is #{Saml::Kit::Namespaces::SUCCESS} def success? Namespaces::SUCCESS == status_code end private def must_match_request_id return if request_id.nil? return if in_response_to == request_id errors[:in_response_to] << error_message(:invalid_response_to) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
saml-kit-1.0.9 | lib/saml/kit/respondable.rb |
saml-kit-1.0.8 | lib/saml/kit/respondable.rb |
saml-kit-1.0.7 | lib/saml/kit/respondable.rb |