Sha256: 0173a645e1663207b223a9603a7bbb76ec37d24217a38c02de6dcbe2650ceab1

Contents?: true

Size: 502 Bytes

Versions: 4

Compression:

Stored size: 502 Bytes

Contents

module Ixtlan
  module Controllers
    module AuthenticationsController

      protected
      def login_from_params
        auth = params[:authentication]
        User.authenticate(auth[:login], auth[:password])
      end
      
      public
      def create
        render_successful_login
      end
      
      def destroy
        authentication_logger.log_user(current_user.nil? ? nil : current_user.login, "already logged out")
        session.clear
        head :ok
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ixtlan-0.2.4 lib/ixtlan/controllers/authentications_controller.rb
ixtlan-0.2.3 lib/ixtlan/controllers/authentications_controller.rb
ixtlan-0.2.2 lib/ixtlan/controllers/authentications_controller.rb
ixtlan-0.2.1 lib/ixtlan/controllers/authentications_controller.rb