Module: HttpAuthentication::Basic

Included in:
Sinatra::EventContext
Defined in:
lib/sinatra_http_auth.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_or_request_with_http_basic(realm = "Application", &login_procedure) ⇒ Object



4
5
6
# File 'lib/sinatra_http_auth.rb', line 4

def authenticate_or_request_with_http_basic(realm = "Application", &)
  authenticate_with_http_basic(&) || request_http_basic_authentication(realm)
end

#authenticate_with_http_basic(&login_procedure) ⇒ Object



8
9
10
# File 'lib/sinatra_http_auth.rb', line 8

def authenticate_with_http_basic(&)
  authenticate(&)
end

#request_http_basic_authentication(realm = "Application") ⇒ Object



12
13
14
# File 'lib/sinatra_http_auth.rb', line 12

def request_http_basic_authentication(realm = "Application")
  authentication_request(realm)
end