Fixed all broken specs

Moved middleware config into authenticators
This commit is contained in:
Sam
2013-08-26 11:04:16 +10:00
parent 912d4b853b
commit 213ce33af2
20 changed files with 137 additions and 328 deletions

View File

@ -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