Sha256: 989549446cf5a171d5705bd51ad487203c9ab0e8f2909726784b338a3916faaf

Contents?: true

Size: 583 Bytes

Versions: 88

Compression:

Stored size: 583 Bytes

Contents

module Rack
  module OAuth2
    class AccessToken
      class Authenticator
        def initialize(token)
          @token = token
        end

        # Callback called in HTTPClient (before sending a request)
        # request:: HTTP::Message
        def filter_request(request)
          @token.authenticate(request)
        end

        # Callback called in HTTPClient (after received a response)
        # response:: HTTP::Message
        # request::  HTTP::Message
        def filter_response(response, request)
          # nothing to do
        end
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 2 rubygems

Version Path
rack-oauth2-0.8.6 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.5 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.4 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.3 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.2 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.1 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.0 lib/rack/oauth2/access_token/authenticator.rb
rack-oauth2-0.8.0.alpha lib/rack/oauth2/access_token/authenticator.rb