Fix a typo in http_basic_authenticate_with

This commit is contained in:
Jean Boussier 2022-03-04 16:09:59 +01:00
parent 9ae05215dc
commit 9feaf7eaae
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ module ActionController
# See ActionController::HttpAuthentication::Basic for example usage.
def http_basic_authenticate_with(name:, password:, realm: nil, **options)
raise ArgumentError, "Expected name: to be a String, got #{name.class}" unless name.is_a?(String)
raise ArgumentError, "Expected password: to be a String, got #{password.class}" unless name.is_a?(String)
raise ArgumentError, "Expected password: to be a String, got #{password.class}" unless password.is_a?(String)
before_action(options) { http_basic_authenticate_or_request_with name: name, password: password, realm: realm }
end
end