lib/rsaml/protocol/authn_request.rb
# Construct an XML fragment representing the authentication request
Construct an XML fragment representing the authentication request
Construct an XML fragment representing the authentication request
def to_xml(xml=Builder::XmlMarkup.new)
        attributes = {}
        attributes['ForceAuthn'] = force_authn unless force_authn.nil?
        attributes['IsPassive'] = is_passive unless is_passive.nil?
        attributes['ProtocolBinding'] = protocol_binding unless protocol_binding.nil?
        attributes['AttributeConsumingServiceURL'] = attribute_consuming_service_url unless attribute_consuming_service_url.nil?
        attributes['ProviderName'] = provider_name unless provider_name.nil?
        attributes = add_xmlns(attributes)
        xml.tag!('samlp:AuthnRequest', attributes) {
          xml << subject.to_xml unless subject.nil?
          xml << name_id_policy.to_xml unless name_id_policy.nil?
          xml << conditions.to_xml unless conditions.nil?
          xml << requested_authn_context unless requested_authn_context.nil?
          xml << scoping.to_xml unless scoping.nil?
        }
      end
def to_xml ( xml = Builder :: XmlMarkup . new ) attributes = { } attributes [ 'ForceAuthn' ] = force_authn unless force_authn . nil? attributes [ 'IsPassive' ] = is_passive unless is_passive . nil? attributes [ 'ProtocolBinding' ] = protocol_binding unless protocol_binding . nil? attributes [ 'AttributeConsumingServiceURL' ] = attribute_consuming_service_url unless attribute_consuming_service_url . nil? attributes [ 'ProviderName' ] = provider_name unless provider_name . nil? attributes = add_xmlns ( attributes ) xml . tag! ( 'samlp:AuthnRequest' , attributes ) { xml << subject . to_xml unless subject . nil? xml << name_id_policy . to_xml unless name_id_policy . nil? xml << conditions . to_xml unless conditions . nil? xml << requested_authn_context unless requested_authn_context . nil? xml << scoping . to_xml unless scoping . nil? } end
Construct an XML fragment representing the authentication request
Construct an XML fragment representing the authentication request
# TODO implement assertion consumer service index # TODO implement assertion consumer service URL
xml
new