Sha256: ff6f836b7ad859538e7286d63ac7ed05289ba065e24d96171ba549b8c740112e

Contents?: true

Size: 1.01 KB

Versions: 10

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

xml.Assertion(assertion_options) do
  xml.Issuer issuer
  signature_for(reference_id: reference_id, xml: xml)
  xml.Subject do
    xml.NameID name_id, name_id_options
    xml.SubjectConfirmation Method: Saml::Kit::Namespaces::BEARER do
      xml.SubjectConfirmationData '', subject_confirmation_data_options
    end
  end
  xml.Conditions conditions_options do
    if request.present?
      xml.AudienceRestriction do
        xml.Audience request.issuer
      end
    end
  end
  xml.AuthnStatement authn_statement_options do
    xml.AuthnContext do
      xml.AuthnContextClassRef Saml::Kit::Namespaces::PASSWORD
    end
  end
  if assertion_attributes.any?
    xml.AttributeStatement do
      assertion_attributes.each do |key, value|
        xml.Attribute Name: key do
          if value.respond_to?(:each)
            value.each do |x|
              xml.AttributeValue x.to_s
            end
          else
            xml.AttributeValue value.to_s
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
saml-kit-1.3.0 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.2.0 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.1.0 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.31 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.30 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.29 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.28 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.27 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.26 lib/saml/kit/builders/templates/assertion.builder
saml-kit-1.0.25 lib/saml/kit/builders/templates/assertion.builder