Skip to content

her-cat/zhipin-scan-login

Repository files navigation

Boss 直聘扫码登录

🔓 PHP 实现 Boss 直聘扫码登录.

StyleCI build status GitHub

安装

$ git clone https://github.com/her-cat/zhipin-scan-login.git
$ cd zhipin-scan-login
$ composer install

使用

运行 php run.php 查看效果。

run.php:

use HerCat\ZhipinScanLogin\Application;

$app = new Application();

$app->observer->setQrCodeObserver(function ($qrUuid) {
    // 获取到二维码 uuid 后
    app('console')->log('qr_uuid: '.$qrUuid);
});

$app->observer->setLoginSuccessObserver(function ($user) {
    // 扫码登录成功后 print_r($user)
    app('console')->log('name:'.$user['name']);
});

$app->observer->setExitObserver(function () {
    // 程序结束运行前
    app('console')->log('Bye bye.');
});

$app->server->run();

License

MIT

About

🔓 Boss 直聘扫码登录

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages