Module: Sinatra::BasicAuth

Defined in:
lib/sinatra/basic_auth.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



70
71
72
73
74
75
76
# File 'lib/sinatra/basic_auth.rb', line 70

def self.registered( app )
  app.set :basic_auth_realm, 'You need to authenticate yourself!'
  app.set :basic_auth_username, 'Frank'
  app.set :basic_auth_password, 'changeme'

  app.helpers Helpers
end

Instance Method Details

#basic_auth(&block) ⇒ Object



66
67
68
# File 'lib/sinatra/basic_auth.rb', line 66

def basic_auth &block
  AuthenticationSettings.new(self, &block)
end