Class: Rack::OAuth2::AccessToken::Authenticator
- Inherits:
-
Object
- Object
- Rack::OAuth2::AccessToken::Authenticator
- Defined in:
- lib/rack/oauth2/access_token/authenticator.rb
Instance Method Summary collapse
-
#filter_request(request) ⇒ Object
- Callback called in HTTPClient (before sending a request) request
-
HTTP::Message.
-
#filter_response(response, request) ⇒ Object
- Callback called in HTTPClient (after received a response) response
- HTTP::Message request
-
HTTP::Message.
-
#initialize(token) ⇒ Authenticator
constructor
A new instance of Authenticator.
Constructor Details
#initialize(token) ⇒ Authenticator
Returns a new instance of Authenticator.
5 6 7 |
# File 'lib/rack/oauth2/access_token/authenticator.rb', line 5 def initialize(token) @token = token end |
Instance Method Details
#filter_request(request) ⇒ Object
Callback called in HTTPClient (before sending a request)
- request
-
HTTP::Message
11 12 13 |
# File 'lib/rack/oauth2/access_token/authenticator.rb', line 11 def filter_request(request) @token.authenticate(request) end |
#filter_response(response, request) ⇒ Object
Callback called in HTTPClient (after received a response)
- response
-
HTTP::Message
- request
-
HTTP::Message
18 19 20 |
# File 'lib/rack/oauth2/access_token/authenticator.rb', line 18 def filter_response(response, request) # nothing to do end |