Module: ActionController::HttpAuthentication::Digest::ControllerMethods
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
::ActionController::Base ,
::ActionView::TestCase::TestController ,
Rails::ApplicationController,
::Rails::HealthController ,
Rails::InfoController,
Rails::MailersController,
Rails::PwaController,
Rails::WelcomeController
| |
Defined in: | actionpack/lib/action_controller/metal/http_authentication.rb |
Instance Method Summary
-
#authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)
Authenticate using an HTTP Digest, or otherwise render an HTTP header requesting the client to send a
::ActionController::HttpAuthentication::Digest
. -
#authenticate_with_http_digest(realm = "Application", &password_procedure)
Authenticate using an HTTP Digest.
-
#request_http_digest_authentication(realm = "Application", message = nil)
Render an HTTP header requesting the client to send a
::ActionController::HttpAuthentication::Digest
for authentication.
Instance Method Details
#authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)
Authenticate using an HTTP Digest, or otherwise render an HTTP header requesting the client to send a ::ActionController::HttpAuthentication::Digest
.
See ::ActionController::HttpAuthentication::Digest
for example usage.
# File 'actionpack/lib/action_controller/metal/http_authentication.rb', line 197
def authenticate_or_request_with_http_digest(realm = "Application", = nil, &password_procedure) authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, ) end
#authenticate_with_http_digest(realm = "Application", &password_procedure)
Authenticate using an HTTP Digest. Returns true if authentication is successful, false otherwise.
# File 'actionpack/lib/action_controller/metal/http_authentication.rb', line 203
def authenticate_with_http_digest(realm = "Application", &password_procedure) HttpAuthentication::Digest.authenticate(request, realm, &password_procedure) end
#request_http_digest_authentication(realm = "Application", message = nil)
Render an HTTP header requesting the client to send a ::ActionController::HttpAuthentication::Digest
for authentication.
# File 'actionpack/lib/action_controller/metal/http_authentication.rb', line 209
def request_http_digest_authentication(realm = "Application", = nil) HttpAuthentication::Digest.authentication_request(self, realm, ) end