Class: Authengine::SessionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/authengine/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

user logs in



14
15
16
17
# File 'app/controllers/authengine/sessions_controller.rb', line 14

def create
  logger.info "session controller: create"
  authenticate_with_password(params[:login], params[:password])
end

#destroyObject

user logs out



20
21
22
23
24
25
26
27
# File 'app/controllers/authengine/sessions_controller.rb', line 20

def destroy
  self.current_user.forget_me if logged_in?
  remove_session_user_roles
  cookies.delete :auth_token
  reset_session
  flash[:notice] = "You have been logged out."
  redirect_to 
end

#newObject



10
11
# File 'app/controllers/authengine/sessions_controller.rb', line 10

def new
end