Skip to Content Skip to Search
Namespace
Methods
A
H
R

Instance Public methods

authenticate_or_request_with_http_basic(realm = nil, message = nil, content_type = nil, &login_procedure)

# File actionpack/lib/action_controller/metal/http_authentication.rb, line 101
def authenticate_or_request_with_http_basic(realm = nil, message = nil, content_type = nil, &login_procedure)
  authenticate_with_http_basic(&login_procedure) || request_http_basic_authentication(realm || "Application", message, content_type)
end

authenticate_with_http_basic(&login_procedure)

# File actionpack/lib/action_controller/metal/http_authentication.rb, line 105
def authenticate_with_http_basic(&login_procedure)
  HttpAuthentication::Basic.authenticate(request, &login_procedure)
end

http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil, content_type: nil)

# File actionpack/lib/action_controller/metal/http_authentication.rb, line 93
def http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil, content_type: nil)
  if password.is_a?(String) && password.blank?
    ActionController.deprecator.warn(BLANK_PASSWORD_DEPRECATION % __method__)
  end

  authenticate_or_request_with_http_basic_credentials(name, password, realm, message, content_type)
end

request_http_basic_authentication(realm = "Application", message = nil, content_type = nil)

# File actionpack/lib/action_controller/metal/http_authentication.rb, line 109
def request_http_basic_authentication(realm = "Application", message = nil, content_type = nil)
  HttpAuthentication::Basic.authentication_request(self, realm, message, content_type)
end