e166e5747c
Enable frozen string for the following files: * lib/gitlab/auth/**/*.rb * lib/gitlab/badge/**/*.rb * lib/gitlab/bare_repository_import/**/*.rb * lib/gitlab/bitbucket_import/**/*.rb * lib/gitlab/bitbucket_server_import/**/*.rb * lib/gitlab/cache/**/*.rb * lib/gitlab/checks/**/*.rb Partially addresses #47424.
18 lines
463 B
Ruby
18 lines
463 B
Ruby
# frozen_string_literal: true
|
|
|
|
# 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
|