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

Instance Method Details

#current_userObject



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_requiredObject



26
27
28
29
30
31
# File 'app/helpers/authic_client/application_helper.rb', line 26

def 
  unless current_user
    session[:authic_return_to_this_url] = request.fullpath
    redirect_to 
  end
end

#signin_iframe_pathObject



18
19
20
# File 'app/helpers/authic_client/application_helper.rb', line 18

def 
  "#{AUTHIC_CLIENT_FULL_URL}/v1/signin_iframe"
end

#signin_pathObject



10
11
12
# File 'app/helpers/authic_client/application_helper.rb', line 10

def 
  "/auth/authic?&authic_action=signin"
end

#signup_pathObject



14
15
16
# File 'app/helpers/authic_client/application_helper.rb', line 14

def 
  "/auth/authic?&authic_action=signup"
end

#user_account_pathObject



22
23
24
# File 'app/helpers/authic_client/application_helper.rb', line 22

def 
  "#{AUTHIC_CLIENT_FULL_URL}/edit_account"
end