Module: Platform::ActionControllerExtension::InstanceMethods
- Defined in:
- lib/platform/extensions/action_controller_extension.rb
Instance Method Summary collapse
- #platform_login_url ⇒ Object
- #platform_logout_url ⇒ Object
- #platform_oauth_redirect_params ⇒ Object
- #platform_redirect_to_oauth ⇒ Object
- #platform_remove_oauth_redirect_params ⇒ Object
- #platform_store_oauth_redirect_params ⇒ Object
- #platform_stringify_url(path, params) ⇒ Object
Instance Method Details
#platform_login_url ⇒ Object
51 52 53 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 51 def platform_login_url platform_stringify_url(Platform::Config.login_url, :display => params[:display], :client_id => params[:client_id]) end |
#platform_logout_url ⇒ Object
55 56 57 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 55 def platform_logout_url platform_stringify_url(Platform::Config.logout_url, :display => params[:display], :client_id => params[:client_id]) end |
#platform_oauth_redirect_params ⇒ Object
47 48 49 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 47 def platform_oauth_redirect_params session[:platform_oauth_redirect_params] end |
#platform_redirect_to_oauth ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 31 def platform_redirect_to_oauth if platform_oauth_redirect_params redirect_to(platform_oauth_redirect_params) return true end false end |
#platform_remove_oauth_redirect_params ⇒ Object
43 44 45 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 43 def platform_remove_oauth_redirect_params session[:platform_oauth_redirect_params] = nil end |
#platform_store_oauth_redirect_params ⇒ Object
39 40 41 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 39 def platform_store_oauth_redirect_params session[:platform_oauth_redirect_params] = params end |
#platform_stringify_url(path, params) ⇒ Object
59 60 61 |
# File 'lib/platform/extensions/action_controller_extension.rb', line 59 def platform_stringify_url(path, params) "#{path}#{path.index('?') ? '&' : '?'}#{params.collect{|n,v| "#{n}=#{CGI.escape(v.to_s)}"}.join("&")}" end |