Module: AuthicClient::ApplicationHelper

Defined in:
app/helpers/authic_client/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_userObject



4
5
6
# File 'app/helpers/authic_client/application_helper.rb', line 4

def current_user
  @current_user ||= ::User.find(session[:authic_user_id]) if session[:authic_user_id]
end

#login_requiredObject



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

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

#signin_iframe_pathObject



16
17
18
# File 'app/helpers/authic_client/application_helper.rb', line 16

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

#signin_pathObject



8
9
10
# File 'app/helpers/authic_client/application_helper.rb', line 8

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

#signup_pathObject



12
13
14
# File 'app/helpers/authic_client/application_helper.rb', line 12

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

#user_account_pathObject



20
21
22
# File 'app/helpers/authic_client/application_helper.rb', line 20

def 
  "#{AuthicClient::AUTHIC_CLIENT_FULL_URL}/edit_account"
end