Class: Authengine::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Authengine::SessionsController
- Defined in:
- app/controllers/authengine/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
user logs in.
-
#destroy ⇒ Object
user logs out.
- #new ⇒ Object
Instance Method Details
#create ⇒ Object
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 |
#destroy ⇒ Object
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 .delete :auth_token reset_session flash[:notice] = "You have been logged out." redirect_to login_path end |
#new ⇒ Object
10 11 |
# File 'app/controllers/authengine/sessions_controller.rb', line 10 def new end |