lib/rsaml/protocol/response.rb
def to_xml(xml=Builder::XmlMarkup.new)
        attributes = {'ID' => id, 'Version' => version, 'IssueInstant' => issue_instant.in_time_zone.xmlschema}
        attributes['InResponseTo'] = in_response_to unless in_response_to.nil?
        attributes['Destination'] = destination unless destination.nil?
        attributes['Consent'] = consent unless consent.nil?
        attributes = add_xmlns(attributes)
        xml.tag!('samlp:Response', attributes) {
          xml << issuer.to_xml unless issuer.nil?
          xml << signature.to_xml unless signature.nil?
          # TODO: add extensions support
          xml << status.to_xml unless status.nil?
          assertions.each { |assertion| xml << assertion.to_xml }
          encrypted_assertions.each { |encrypted_assertion| xml << encrypted_assertion.to_xml }
        }
      end
# Construct an XML fragment representing the request
Construct an XML fragment representing the request
Construct an XML fragment representing the request
def to_xml(xml=Builder::XmlMarkup.new)
        attributes = {'ID' => id, 'Version' => version, 'IssueInstant' => issue_instant.in_time_zone.xmlschema}
        attributes['InResponseTo'] = in_response_to unless in_response_to.nil?
        attributes['Destination'] = destination unless destination.nil?
        attributes['Consent'] = consent unless consent.nil?
        attributes = add_xmlns(attributes)
        xml.tag!('samlp:Response', attributes) {
          xml << issuer.to_xml unless issuer.nil?
          xml << signature.to_xml unless signature.nil?
          xml << status.to_xml unless status.nil?
          assertions.each { |assertion| xml << assertion.to_xml }
          encrypted_assertions.each { |encrypted_assertion| xml << encrypted_assertion.to_xml }
        }
      end
def to_xml ( xml = Builder :: XmlMarkup . new ) attributes = { 'ID' => id , 'Version' => version , 'IssueInstant' => issue_instant . in_time_zone . xmlschema } attributes [ 'InResponseTo' ] = in_response_to unless in_response_to . nil? attributes [ 'Destination' ] = destination unless destination . nil? attributes [ 'Consent' ] = consent unless consent . nil? attributes = add_xmlns ( attributes ) xml . tag! ( 'samlp:Response' , attributes ) { xml << issuer . to_xml unless issuer . nil? xml << signature . to_xml unless signature . nil? xml << status . to_xml unless status . nil? assertions . each { | assertion | xml << assertion . to_xml } encrypted_assertions . each { | encrypted_assertion | xml << encrypted_assertion . to_xml } } end
Construct an XML fragment representing the request
Construct an XML fragment representing the request
# TODO: add extensions support
xml
new