Module: Maquina::Authenticate

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/maquina/authenticate.rb

Instance Method Summary collapse

Instance Method Details

#after_authentication_urlObject



27
28
29
# File 'app/controllers/concerns/maquina/authenticate.rb', line 27

def after_authentication_url
  session.delete(:return_to_after_authenticating) || root_url
end

#authenticated?Boolean Also known as: signed_in?

Returns:

  • (Boolean)


18
19
20
# File 'app/controllers/concerns/maquina/authenticate.rb', line 18

def authenticated?
  Maquina::Current.signed_in?
end

#current_userObject



23
24
25
# File 'app/controllers/concerns/maquina/authenticate.rb', line 23

def current_user
  Maquina::Current.user
end

#require_authenticationObject



31
32
33
# File 'app/controllers/concerns/maquina/authenticate.rb', line 31

def require_authentication
  load_session || request_authentication
end