Sha256: c90d15846ea49cfb74faeb8db76b7c3b2077b1cf6abcabcaef21eb12912a9172

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 Bytes

Contents

require_relative './fingerprinting'

module ActionHook
  module Security
    module Headers
      include ActionHook::Security::Fingerprinting

      def headers_with_security(configuration)
        headers_with_security = headers.dup

        if digest = fingerprint
          headers_with_security.merge!(configuration.hash_header_name => digest)
        end

        headers_with_security.merge!(authentication.to_h) if authentication

        headers_with_security
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
actionhook-1.0.2 lib/actionhook/security/headers.rb
actionhook-1.0.1 lib/actionhook/security/headers.rb
actionhook-1.0.0 lib/actionhook/security/headers.rb