|
|
|
@ -40,7 +40,7 @@ module OmniAuth |
|
|
|
|
|
|
|
|
|
module FlexibleStrategy |
|
|
|
|
def on_auth_path? |
|
|
|
|
(match_provider! || false) && super |
|
|
|
|
possible_auth_path? && (match_provider! || false) && super |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
## |
|
|
|
@ -72,6 +72,13 @@ module OmniAuth |
|
|
|
|
"#{path_prefix}/#{name}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
## |
|
|
|
|
# Returns true if the current path could be an authentication request, |
|
|
|
|
# false otherwise (e.g. for resources). |
|
|
|
|
def possible_auth_path? |
|
|
|
|
current_path =~ /\A#{path_prefix}/ |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def providers |
|
|
|
|
@providers ||= OpenProject::Plugins::AuthPlugin.providers_for(self.class) |
|
|
|
|
end |
|
|
|
|