Class: SAML2::Status
Constant Summary collapse
- SUCCESS =
"urn:oasis:names:tc:SAML:2.0:status:Success"
Instance Attribute Summary collapse
Attributes inherited from Base
Instance Method Summary collapse
-
#build(builder) ⇒ void
Serialize this object to XML, as part of a larger document.
-
#from_xml(node) ⇒ void
Parse an XML element into this object.
-
#initialize(code = SUCCESS, message = nil) ⇒ Status
constructor
A new instance of Status.
- #success? ⇒ Boolean
Methods inherited from Base
#decrypt, from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
Instance Attribute Details
#code ⇒ String
10 11 12 |
# File 'lib/saml2/status.rb', line 10 def code @code end |
#message ⇒ String
10 11 12 |
# File 'lib/saml2/status.rb', line 10 def @message end |
Instance Method Details
#build(builder) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
32 33 34 35 36 37 38 39 |
# File 'lib/saml2/status.rb', line 32 def build(builder) builder["samlp"].Status do |status| status["samlp"].StatusCode(Value: code) Array().each do |m| status["samlp"].StatusMessage(m) end end end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
21 22 23 24 25 |
# File 'lib/saml2/status.rb', line 21 def from_xml(node) super self.code = node.at_xpath("samlp:StatusCode", Namespaces::ALL)["Value"] self. = load_string_array(xml, "samlp:StatusMessage") end |