rayful / hr-login-client
A client tool for other system to login use HR users.
Installs: 189
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/rayful/hr-login-client
Requires
- rayful/object-tool: ^1.0
This package is not auto-updated.
Last update: 2025-10-12 10:33:49 UTC
README
一个可以使用HR系统的用户系统验证登录系统的客户端工具类。
安装
composer require rayful/hr-login-client
基本用法
首先可以将登录地址写入setting文件里面去,然后通过依赖注入去调用。
用例:
$root = "https://hr.system/user_check"; $client = new \rayful\Tool\HR\LoginClient($root); try{ $user = $client->tryGetUser("username","password"); $this->saveSession($user); }catch (\rayful\Tool\HR\LoginException $exception){ $this->displayError($exception->getMessage()); $this->logErrorCode($exception->getCode()); }