Skip to Content Skip to Search

module ActionController::HttpAuthentication::Digest::ControllerMethods

Public instance methods

Authenticate using an HTTP Digest, or otherwise render an HTTP header requesting the client to send a Digest.

See ActionController::HttpAuthentication::Digest for example usage.

Source code GitHub
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 197
def authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)
  authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, message)
end

Authenticate using an HTTP Digest. Returns true if authentication is successful, false otherwise.

Source code GitHub
# 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

Render an HTTP header requesting the client to send a Digest for authentication.

Source code GitHub
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 209
def request_http_digest_authentication(realm = "Application", message = nil)
  HttpAuthentication::Digest.authentication_request(self, realm, message)
end

Definition files