2010-10-14 20:04:02 +02:00
|
|
|
module Devise
|
|
|
|
module OmniAuth
|
|
|
|
module UrlHelpers
|
2016-03-07 11:19:27 -03:00
|
|
|
def omniauth_authorize_path(resource_or_scope, provider, *args)
|
2010-10-14 20:04:02 +02:00
|
|
|
scope = Devise::Mapping.find_scope!(resource_or_scope)
|
2016-03-07 11:19:27 -03:00
|
|
|
_devise_route_context.send("#{scope}_#{provider}_omniauth_authorize_path", *args)
|
2010-10-14 20:04:02 +02:00
|
|
|
end
|
|
|
|
|
2016-03-08 11:55:11 -03:00
|
|
|
def omniauth_authorize_url(resource_or_scope, provider, *args)
|
|
|
|
scope = Devise::Mapping.find_scope!(resource_or_scope)
|
|
|
|
_devise_route_context.send("#{scope}_#{provider}_omniauth_authorize_url", *args)
|
|
|
|
end
|
|
|
|
|
2016-03-07 11:19:27 -03:00
|
|
|
def omniauth_callback_path(resource_or_scope, provider, *args)
|
2010-10-14 20:04:02 +02:00
|
|
|
scope = Devise::Mapping.find_scope!(resource_or_scope)
|
2016-03-07 11:19:27 -03:00
|
|
|
_devise_route_context.send("#{scope}_#{provider}_omniauth_callback_path", *args)
|
2010-10-14 20:04:02 +02:00
|
|
|
end
|
2016-03-08 11:55:11 -03:00
|
|
|
|
|
|
|
def omniauth_callback_url(resource_or_scope, provider, *args)
|
|
|
|
scope = Devise::Mapping.find_scope!(resource_or_scope)
|
|
|
|
_devise_route_context.send("#{scope}_#{provider}_omniauth_callback_url", *args)
|
|
|
|
end
|
2010-10-14 20:04:02 +02:00
|
|
|
end
|
|
|
|
end
|
2011-02-25 14:20:12 -03:00
|
|
|
end
|