Class: Rack::OauthProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/oauth_proxy.rb,
lib/rack/oauth_proxy/client.rb,
lib/rack/oauth_proxy/version.rb,
lib/rack/oauth_proxy/client/request.rb

Defined Under Namespace

Classes: Client

Constant Summary collapse

VERSION =
"0.2.1"

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ OauthProxy

Returns a new instance of OauthProxy.



7
8
9
10
# File 'lib/rack/oauth_proxy.rb', line 7

def initialize(app, options = {})
  @app = app
  @options = options
end

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
# File 'lib/rack/oauth_proxy.rb', line 12

def call(env)
  env["rack-oauth_proxy.response"] = client.fetch(env)
  @app.call(env)
end