Skip to content

ifornew/phpcas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpcas

Build Status License

About Laravel

PhpCas client for the Laravel Framework 5.5.

Author

Yanghaiquan

Usage

create auth middleware then set the handle method like this:

/**
 * Handle an incoming request.
 *
 * @param  Request $request
 * @param  Closure $next
 * @return mixed
 */
public function handle(Request $request, Closure $next)
{
    PhpCas::handLogoutRequest();
    return PhpCas::checkAuthentication($request,$next,function ($userId){
	    $user = User::firstOrNew(['mobile' => $userId],['password' => bcrypt(123456)]);
	    return Auth::loginUsingId($user->id);
    });
}

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

PhpCas client for the Laravel Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages