Module: AuthicClient::ApplicationHelper
- Defined in:
- app/helpers/authic_client/application_helper.rb
Constant Summary collapse
- AUTHIC_CLIENT_FULL_URL =
defined?(AuthicClient::FULL_URL) ? AuthicClient::FULL_URL : "https://#{AUTHIC_CLIENT_SUBDOMAIN}.authic.com"
Instance Method Summary collapse
- #current_user ⇒ Object
- #login_required ⇒ Object
- #signin_iframe_path ⇒ Object
- #signin_path ⇒ Object
- #signup_path ⇒ Object
- #user_account_path ⇒ Object
Instance Method Details
#current_user ⇒ Object
6 7 8 |
# File 'app/helpers/authic_client/application_helper.rb', line 6 def current_user @current_user ||= ::User.find(session[:authic_user_id]) if session[:authic_user_id] end |
#login_required ⇒ Object
26 27 28 29 30 31 |
# File 'app/helpers/authic_client/application_helper.rb', line 26 def login_required unless current_user session[:authic_return_to_this_url] = request.fullpath redirect_to signin_path end end |
#signin_iframe_path ⇒ Object
18 19 20 |
# File 'app/helpers/authic_client/application_helper.rb', line 18 def signin_iframe_path "#{AUTHIC_CLIENT_FULL_URL}/v1/signin_iframe" end |
#signin_path ⇒ Object
10 11 12 |
# File 'app/helpers/authic_client/application_helper.rb', line 10 def signin_path "/auth/authic?&authic_action=signin" end |
#signup_path ⇒ Object
14 15 16 |
# File 'app/helpers/authic_client/application_helper.rb', line 14 def signup_path "/auth/authic?&authic_action=signup" end |
#user_account_path ⇒ Object
22 23 24 |
# File 'app/helpers/authic_client/application_helper.rb', line 22 def user_account_path "#{AUTHIC_CLIENT_FULL_URL}/edit_account" end |