Sha256: 10cb9d0f9572e39aa51b909c51f42ccba1d6abca79d96ea34b49b1d2a03e77c6

Contents?: true

Size: 775 Bytes

Versions: 39

Compression:

Stored size: 775 Bytes

Contents

module OpenIDConnect
  module Debugger
    class RequestFilter
      # Callback called in HTTPClient (before sending a request)
      # request:: HTTP::Message
      def filter_request(request)
        started = "======= [OpenIDConnect] HTTP REQUEST STARTED ======="
        log started, request.dump
      end

      # Callback called in HTTPClient (after received a response)
      # request::  HTTP::Message
      # response:: HTTP::Message
      def filter_response(request, response)
        finished = "======= [OpenIDConnect] HTTP REQUEST FINISHED ======="
        log '-' * 50, response.dump, finished
      end

      private

      def log(*outputs)
        outputs.each do |output|
          OpenIDConnect.logger.info output
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
openid_connect-1.4.2 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.4.1 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.4.0 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.3.1 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.3.0 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.2.0 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.8 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.7 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.6 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.5 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.4 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.3 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.2 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.1 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.1.0 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.0.3 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.0.2 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.0.1 lib/openid_connect/debugger/request_filter.rb
openid_connect-1.0.0 lib/openid_connect/debugger/request_filter.rb
openid_connect-0.12.0 lib/openid_connect/debugger/request_filter.rb