Class: FbGraph2::RequestFilter::Authenticator

Inherits:
Rack::OAuth2::AccessToken::Authenticator
  • Object
show all
Defined in:
lib/fb_graph2/request_filter/authenticator.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_token) ⇒ Authenticator

Returns a new instance of Authenticator.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/fb_graph2/request_filter/authenticator.rb', line 4

def initialize(access_token)
  _access_token_ = case access_token
  when Rack::OAuth2::AccessToken
    access_token
  else
    Rack::OAuth2::AccessToken::Bearer.new(
      access_token: access_token
    )
  end
  super _access_token_
end