Sha256: 05318c60c2fc17039f5076a080097a2af14361b16135e1c5150d9bcfcb2aaaf4

Contents?: true

Size: 933 Bytes

Versions: 1

Compression:

Stored size: 933 Bytes

Contents

# frozen_string_literal: true

module Saml
  module Kit
    # This class is an implementation of the
    # Null Object pattern for when a Response
    # is missing an Assertion.
    class NullAssertion
      include ActiveModel::Validations
      include Translatable
      validate :invalid

      def issuer; end

      def name_id; end

      def signed?
        false
      end

      def signature; end

      def attributes
        []
      end

      def started_at
        Time.at(0)
      end

      def expired_at
        Time.at(0)
      end

      def audiences
        []
      end

      def encrypted?
        false
      end

      def decryptable?
        false
      end

      def present?
        false
      end

      def to_xml(*_args)
        ''
      end

      def invalid
        errors.add(:assertion, error_message(:invalid))
      end

      def name
        'NullAssertion'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
saml-kit-1.2.0 lib/saml/kit/null_assertion.rb