Sha256: 0c3e44414aafdf1469650e1213f39f78b75b1613325e10de173df3166bf95358

Contents?: true

Size: 738 Bytes

Versions: 21

Compression:

Stored size: 738 Bytes

Contents

module Rack
  module OAuth2
    module Debugger
      class RequestFilter
        # Callback called in HTTPClient (before sending a request)
        # request:: HTTP::Message
        def filter_request(request)
          started = "======= [Rack::OAuth2] HTTP REQUEST STARTED ======="
          OAuth2.logger.info [started, request.dump].join("\n")
        end

        # Callback called in HTTPClient (after received a response)
        # request::  HTTP::Message
        # response:: HTTP::Message
        def filter_response(request, response)
          finished = "======= [Rack::OAuth2] HTTP REQUEST FINISHED ======="
          OAuth2.logger.info ['-' * 50, response.dump, finished].join("\n")
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rack-oauth2-1.0.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.9 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.8 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.7 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.6 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.5 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.4 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.3 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.2 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.1 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.14.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.13.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.12.2 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.12.1 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.12.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.11.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.10.1 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.10.0 lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.10.0.alpha lib/rack/oauth2/debugger/request_filter.rb
rack-oauth2-0.9.5 lib/rack/oauth2/debugger/request_filter.rb