mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
Fixed all broken specs
Moved middleware config into authenticators
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
# this class is used by the user and omniauth controllers, it controls how
|
||||
# an authentication system interacts with our database
|
||||
|
||||
module Auth; end
|
||||
|
||||
require 'auth/result'
|
||||
# an authentication system interacts with our database and middleware
|
||||
|
||||
class Auth::Authenticator
|
||||
def after_authenticate(auth_options)
|
||||
@ -21,4 +17,10 @@ class Auth::Authenticator
|
||||
def lookup_user(user_info, email)
|
||||
user_info.try(:user) || User.where(email: email).first
|
||||
end
|
||||
|
||||
# hook used for registering omniauth middleware,
|
||||
# without this we can not authenticate
|
||||
def register_middleware(omniauth)
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user