You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
550 B
PHP
36 lines
550 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Utils\Wecenter;
|
|
|
|
class Auth
|
|
{
|
|
protected $driver;
|
|
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
private static function getDriver()
|
|
{
|
|
return Factory::createAuth();
|
|
}
|
|
|
|
public static function login($uid, $time)
|
|
{
|
|
self::getDriver()->login($uid, $time);
|
|
}
|
|
|
|
public static function getUser()
|
|
{
|
|
return self::getDriver()->getUser();
|
|
}
|
|
|
|
public static function logout()
|
|
{
|
|
self::getDriver()->logout();
|
|
Wecenter::Loginout();
|
|
}
|
|
}
|