Class: Onelogin::Saml::Logoutresponse

Inherits:
Object
  • Object
show all
Includes:
Codeing
Defined in:
lib/onelogin/saml/logoutresponse.rb

Instance Method Summary collapse

Methods included from Codeing

#decode, #deflate, #encode, #escape, #inflate, #unescape

Constructor Details

#initialize(response) ⇒ Logoutresponse

Returns a new instance of Logoutresponse.



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

def initialize(response)
  begin
    @response = decode(response)
    document
  rescue
    @response = inflate(decode(response))
  end
end

Instance Method Details

#in_response_toObject



23
24
25
# File 'lib/onelogin/saml/logoutresponse.rb', line 23

def in_response_to
  document.elements["/samlp:LogoutResponse"].attributes["InResponseTo"]
end

#issuerObject



19
20
21
# File 'lib/onelogin/saml/logoutresponse.rb', line 19

def issuer
  document.elements["/samlp:LogoutResponse/saml:Issuer"].text
end

#success?Boolean

Returns:

  • (Boolean)


27
28
29
30
# File 'lib/onelogin/saml/logoutresponse.rb', line 27

def success?
  document.elements["/samlp:LogoutResponse/samlp:Status/samlp:StatusCode"].attributes["Value"] == "urn:oasis:names:tc:SAML:2.0:status:Success"
  
end