gitlab-org--gitlab-foss/lib/gitlab/auth/database/authentication.rb
2018-03-27 09:21:17 +02:00

16 lines
432 B
Ruby

# These calls help to authenticate to OAuth provider by providing username and password
#
module Gitlab
module Auth
module Database
class Authentication < Gitlab::Auth::OAuth::Authentication
def login(login, password)
return false unless Gitlab::CurrentSettings.password_authentication_enabled_for_git?
return user if user&.valid_password?(password)
end
end
end
end
end