Class: Hadley::Middleware
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Hadley::Middleware
- Includes:
- Authz
- Defined in:
- lib/hadley/middleware.rb
Overview
This class provides the rack middleware that builds on top of warden to provide the necessary endpoints for a rack application to function as an AFID protected resource.
Instance Method Summary collapse
-
#initialize(app = nil, options = {}) {|@config| ... } ⇒ Middleware
constructor
Initializes the middleware with the provided application and options.
Methods included from Authz
Constructor Details
#initialize(app = nil, options = {}) {|@config| ... } ⇒ Middleware
Initializes the middleware with the provided application and options
13 14 15 16 17 18 19 |
# File 'lib/hadley/middleware.rb', line 13 def initialize(app=nil, ={}) super(app) @config ||= Hadley::Config.new() yield @config if block_given? @tokens = @config.token_store self end |