Module: HttpAuthentication::Basic
- Included in:
- Sinatra::EventContext
- Defined in:
- lib/sinatra_http_auth.rb
Instance Method Summary collapse
- #authenticate_or_request_with_http_basic(realm = "Application", &login_procedure) ⇒ Object
- #authenticate_with_http_basic(&login_procedure) ⇒ Object
- #request_http_basic_authentication(realm = "Application") ⇒ Object
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", &login_procedure) authenticate_with_http_basic(&login_procedure) || 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(&login_procedure) authenticate(&login_procedure) 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 |