Module: Sinatra::BasicAuth::Helpers
- Defined in:
- lib/sinatra/basic_auth.rb
Instance Method Summary collapse
Instance Method Details
#auth ⇒ Object
14 15 16 |
# File 'lib/sinatra/basic_auth.rb', line 14 def auth @auth ||= Rack::Auth::Basic::Request.new(request.env) end |
#authorized? ⇒ Boolean
18 19 20 |
# File 'lib/sinatra/basic_auth.rb', line 18 def request.env[REALM_ENV % realm] != nil end |
#realm ⇒ Object
22 23 24 |
# File 'lib/sinatra/basic_auth.rb', line 22 def realm @realm end |