提交 1fab5832 编写于 作者: J Jacob Vosmaer

Remove instances of Auth.new

上级 fa35aea3
...@@ -45,7 +45,7 @@ class JwtController < ApplicationController ...@@ -45,7 +45,7 @@ class JwtController < ApplicationController
# TODO: this is a copy and paste from grack_auth, # TODO: this is a copy and paste from grack_auth,
# it should be refactored in the future # it should be refactored in the future
user = Gitlab::Auth.new.find(login, password) user = Gitlab::Auth.find_in_gitlab_or_ldap(login, password)
# If the user authenticated successfully, we reset the auth failure count # If the user authenticated successfully, we reset the auth failure count
# from Rack::Attack for that IP. A client may attempt to authenticate # from Rack::Attack for that IP. A client may attempt to authenticate
......
...@@ -95,7 +95,7 @@ module Grack ...@@ -95,7 +95,7 @@ module Grack
end end
def authenticate_user(login, password) def authenticate_user(login, password)
user = Gitlab::Auth.new.find_in_gitlab_or_ldap(login, password) user = Gitlab::Auth.find_in_gitlab_or_ldap(login, password)
unless user unless user
user = oauth_access_token_check(login, password) user = oauth_access_token_check(login, password)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册