class SAML::Core::Status

Attributes

status_code[R]

Public Class Methods

from_xml(xml) click to toggle source

FIXME attr_reader :status_message FIXME attr_reader :status_detail

# File lib/saml/core/status.rb, line 9
def self.from_xml(xml); new.from_xml(xml); end

Public Instance Methods

from_xml(xml) click to toggle source
# File lib/saml/core/status.rb, line 11
def from_xml(xml)
  @status_code = REXML::XPath.first(
    xml,
    "//samlp:Status/samlp:StatusCode/@Value", 
    { 'samlp' => 'urn:oasis:names:tc:SAML:2.0:protocol'}
  ).value
  self
end
success?() click to toggle source
# File lib/saml/core/status.rb, line 20
def success?
  @status_code == 'urn:oasis:names:tc:SAML:2.0:status:Success'
end