OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/lib/open_project/authentication/strategies/warden/basic_auth_failure.rb

22 lines
556 B

module OpenProject
module Authentication
module Strategies
module Warden
##
# This strategy is inserted after optional basic auth strategies to
# indicate that invalid basic auth credentials were provided.
class BasicAuthFailure < ::Warden::Strategies::BasicAuth
def valid?
OpenProject::Configuration.apiv3_enable_basic_auth? && super
end
def authenticate_user(_username, _password)
nil # always fails
end
end
end
end
end
end