Sha256: c7aa2666e2e6801a9331090d0729643ba682a89c42bb03ada7b636eb64490ec3

Contents?: true

Size: 370 Bytes

Versions: 12

Compression:

Stored size: 370 Bytes

Contents

class Epics::XMLSIG < Faraday::Middleware

  def initialize(app, options = {})
    super(app)
    @client = options[:client]
  end

  def call(env)
    @signer = Epics::Signer.new(@client, env.request_body)
    @signer.digest!
    @signer.sign!

    env.request_body = @signer.doc.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)
    @app.call(env)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
epics-2.7.0 lib/epics/middleware/xmlsig.rb
epics-2.6.0 lib/epics/middleware/xmlsig.rb
epics-2.5.0 lib/epics/middleware/xmlsig.rb
epics-2.4.0 lib/epics/middleware/xmlsig.rb
epics-2.3.0 lib/epics/middleware/xmlsig.rb
epics-2.2.0 lib/epics/middleware/xmlsig.rb
epics-2.1.2 lib/epics/middleware/xmlsig.rb
epics-2.1.1 lib/epics/middleware/xmlsig.rb
epics-2.1.0 lib/epics/middleware/xmlsig.rb
epics-2.0.0 lib/epics/middleware/xmlsig.rb
epics-1.8.1 lib/epics/middleware/xmlsig.rb
epics-1.8.0 lib/epics/middleware/xmlsig.rb