Module: ColorgyDeviseSSOManager
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/colorgy_devise_sso_manager.rb
Constant Summary collapse
- @@sst_verification_method =
'RS256'- @@sso_enabled =
true
Instance Method Summary collapse
- #logout_url ⇒ Object
-
#sign_out_if_needed ⇒ Object
Sign the user out if needed.
-
#sign_out_url ⇒ Object
Helper to get the core sign-out URL.
-
#sso_off! ⇒ Object
Turn off SSO.
Instance Method Details
#logout_url ⇒ Object
24 25 26 |
# File 'app/controllers/concerns/colorgy_devise_sso_manager.rb', line 24 def logout_url sign_out_url end |
#sign_out_if_needed ⇒ Object
Sign the user out if needed
29 30 31 32 |
# File 'app/controllers/concerns/colorgy_devise_sso_manager.rb', line 29 def sign_out_if_needed return unless !@@sso_enabled && params[:logout] == 'true' sign_out :user end |
#sign_out_url ⇒ Object
Helper to get the core sign-out URL
16 17 18 19 20 21 22 |
# File 'app/controllers/concerns/colorgy_devise_sso_manager.rb', line 16 def sign_out_url if @@sso_enabled "#{core_url}/logout" else "#{root_path}?logout=true" end end |
#sso_off! ⇒ Object
Turn off SSO
35 36 37 |
# File 'app/controllers/concerns/colorgy_devise_sso_manager.rb', line 35 def sso_off! @@sso_enabled = false end |