Sha256: 2ba0da4ccd77541ec17875b0627c4115cac12dafc66486d3b19234fd39149b43

Contents?: true

Size: 677 Bytes

Versions: 2

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Mpassid
    module Test
      class CertStore
        attr_reader :sign_certificate, :sign_private_key

        def initialize
          # Use local certificate and private key for signing because otherwise
          # the locally signed SAMLResponse's signature cannot be properly
          # validated as we cannot sign it using the actual environments private
          # key which is unknown.
          sign_certgen = OmniAuth::MPASSid::Test::CertificateGenerator.new
          @sign_certificate = sign_certgen.certificate
          @sign_private_key = sign_certgen.private_key
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-mpassid-0.19.0 lib/decidim/mpassid/test/cert_store.rb
decidim-mpassid-0.18.0 lib/decidim/mpassid/test/cert_store.rb