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

@ -35,6 +35,16 @@ module Discourse
@plugins
end
def self.authenticators
# TODO: perhaps we don't need auth providers and authenticators maybe one object is enough
# NOTE: this bypasses the site settings and gives a list of everything, we need to register every middleware
# for the cases of multisite
# In future we may change it so we don't include them all for cases where we are not a multisite, but we would
# require a restart after site settings change
Users::OmniauthCallbacksController::BUILTIN_AUTH + auth_providers.map(&:authenticator)
end
def self.auth_providers
providers = []
if plugins