Sha256: 1dfe1b24dcf2c4b0e393200c47f04b5caca5e2ed6dba02de29dc410959f32c02

Contents?: true

Size: 362 Bytes

Versions: 18

Compression:

Stored size: 362 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["body"])
    @signer.digest!
    @signer.sign!

    env["body"] = @signer.doc.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)

    @app.call(env)
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
epics-1.7.2 lib/epics/middleware/xmlsig.rb
epics-1.7.1 lib/epics/middleware/xmlsig.rb
epics-1.7.0 lib/epics/middleware/xmlsig.rb
epics-1.6.0 lib/epics/middleware/xmlsig.rb
epics-1.5.2 lib/epics/middleware/xmlsig.rb
epics-1.5.1 lib/epics/middleware/xmlsig.rb
epics-1.5.0 lib/epics/middleware/xmlsig.rb
epics-1.4.1 lib/epics/middleware/xmlsig.rb
epics-1.4.0 lib/epics/middleware/xmlsig.rb
epics-1.3.1 lib/epics/middleware/xmlsig.rb
epics-1.3.0 lib/epics/middleware/xmlsig.rb
epics-1.2.2 lib/epics/middleware/xmlsig.rb
epics-1.2.1 lib/epics/middleware/xmlsig.rb
epics-1.2.0 lib/epics/middleware/xmlsig.rb
epics-1.1.2 lib/epics/middleware/xmlsig.rb
epics-1.1.1 lib/epics/middleware/xmlsig.rb
epics-1.1.0 lib/epics/middleware/xmlsig.rb
epics-1.0.0 lib/epics/middleware/xmlsig.rb