<commit_before>module Saml
  class Response
    include Saml::ComplexTypes::StatusResponseType

    tag "Response"
    has_many :assertions, Saml::Assertion, tag: "Assertion"
    has_many :encrypted_assertions, Saml::EncryptedAssertion, tag: "EncryptedAssertion"

    def authn_failed?
      !success? && status.status_code.authn_failed?
    end

    def request_denied?
      !success? && status.status_code.request_denied?
    end

    def no_authn_context?
      !success? && status.status_code.no_authn_context?
    end

    def assertion
      assertions.first
    end

    def assertion=(assertion)
      (self.assertions ||= []) << assertion
    end

    def encrypted_assertion
      encrypted_assertions.first
    end

    def encrypted_assertions=(encrypted_assertion)
      (self.encrypted_assertions ||= []) << encrypted_assertion
     end
  end
end
<commit_msg>added encryptedassertion to response<commit_after>module Saml
  class Response
    include Saml::ComplexTypes::StatusResponseType

    tag "Response"
    has_many :assertions, Saml::Assertion, tag: "Assertion"
    has_many :encrypted_assertions, Saml::Elements::EncryptedAssertion, tag: "EncryptedAssertion"

    def authn_failed?
      !success? && status.status_code.authn_failed?
    end

    def request_denied?
      !success? && status.status_code.request_denied?
    end

    def no_authn_context?
      !success? && status.status_code.no_authn_context?
    end

    def assertion
      assertions.first
    end

    def assertion=(assertion)
      (self.assertions ||= []) << assertion
    end

    def encrypted_assertion
      encrypted_assertions.first
    end

    def encrypted_assertions=(encrypted_assertion)
      (self.encrypted_assertions ||= []) << encrypted_assertion
     end
  end
end

{'fraction_non_alphanumeric': 0.08759124087591241, 'fraction_numerical': 0.0, 'mean_word_length': 3.4328358208955225, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1960478', 'n_tokens_mistral': 573, 'n_tokens_neox': 543, 'n_words': 109}