Class: Rack::Auth::Signature
- Inherits:
-
Object
- Object
- Rack::Auth::Signature
- Includes:
- Helpers
- Defined in:
- lib/rack/auth/signature.rb,
lib/rack/auth/signature/helpers.rb
Defined Under Namespace
Modules: Helpers
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}, &block) ⇒ Signature
constructor
A new instance of Signature.
Methods included from Helpers::Configuration
Constructor Details
#initialize(app, options = {}, &block) ⇒ Signature
Returns a new instance of Signature.
18 19 20 21 22 |
# File 'lib/rack/auth/signature.rb', line 18 def initialize(app, = {}, &block) @app = app = (Hash()) instance_eval(&block) if block end |
Instance Method Details
#call(env) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rack/auth/signature.rb', line 24 def call(env) @request = Rack::Request.new(env) if excluded? || allowed? @app.call(env) else response = [:signatures][:error_response].values Rack::Response.new(*response).finish end end |