2018-03-05 17:26:40 -05:00
|
|
|
# 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?
|
|
|
|
|
2018-03-26 05:23:54 -04:00
|
|
|
return user if user&.valid_password?(password)
|
2018-03-05 17:26:40 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|