main
 1# frozen_string_literal: true
 2
 3module Saml
 4  module Kit
 5    class Assertion
 6      TABLE = {
 7        'Assertion Present?' => ->(x) { x.present? },
 8        'Issuer' => ->(x) { x.issuer },
 9        'Name Id' => ->(x) { x.name_id },
10        'Attributes' => ->(x) { x.attributes.inspect },
11        'Not Before' => ->(x) { x.started_at },
12        'Not After' => ->(x) { x.expired_at },
13        'Audiences' => ->(x) { x.audiences.inspect },
14        'Encrypted?' => ->(x) { x.encrypted? },
15        'Decryptable' => ->(x) { x.decryptable? },
16      }.freeze
17
18      def build_table(table = [])
19        TABLE.each do |key, callable|
20          table.push([key, callable.call(self)])
21        end
22        signature.build_table(table)
23      end
24    end
25  end
26end