Sha256: 6c18b7555f68cf6a0ff01605f9b02ee816ddeb2afa1e069c8d20b84bb24dc1b3
Contents?: true
Size: 509 Bytes
Versions: 6
Compression:
Stored size: 509 Bytes
Contents
class SessionsController < ApplicationController def new redirect_to root_path if current_user end def create ldap_user = Adauth.authenticate(params[:username], params[:password]) if ldap_user user = <%= model_name.camelize %>.return_and_create_with_adauth(ldap_user) session[:user_id] = user.id redirect_to root_path else redirect_to root_path, :error => "Invalid Login" end end def destroy session[:user_id] = nil redirect_to root_path end end
Version data entries
6 entries across 6 versions & 1 rubygems