PHPackages                             waywake/auth-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. waywake/auth-client

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

waywake/auth-client
===================

v4.0.3(4mo ago)071PHPPHP ^8.3

Since May 4Pushed 4mo agoCompare

[ Source](https://github.com/waywake/auth-client-php)[ Packagist](https://packagist.org/packages/waywake/auth-client)[ RSS](/packages/waywake-auth-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (36)Used By (0)

Auth 系统 PHP Client
==================

[](#auth-系统-php-client)

> 该项目使用 composer 来完成加载

### 配置步骤

[](#配置步骤)

1. 找侯小贝配置登录auth信息 ***AppId*** ***AppSecret*** ***guard***
2. 执行

```
composer config repositories.php-auth-client vcs git@git.int.haowumc.com:composer/php-auth-client.git
composer require paidian/auth-client
```

### 服务端代码使用

[](#服务端代码使用)

1. 删除路由验证用户登录信息中间件,如无请忽略。
2. 删除代码中验证权限代码 `$this->middleware(CheckRole::class);` 如无请忽略。
3. 获取登录者信息由 `$this->user = app('request')->user('auth');` 变更为 `$this->user`
4. 给前端提供获取当前登录者信息接口, 如有请忽略
5. 在需要验证登录信息的控制器中配置如下代码（ERP项目为例）

```
    use \PdAuth\Controller;

    public function __construct()
    {
        //这里配置的是ERP对应的guard
        $guard = "erp";
        $this->auth($guard);
    }
```

\####获取当前登录用户信息

```
 $this->user
```

\#####上线需配置ENV 上线操作者配置

```
RPC_AUTH_URI=http://auth.in.haowumc.com
AUTH_ERP_SECRET=123456
```

\###前端代码使用

1. 获取登录者信息 未登录 http code 返回 401和登录地址 ***客户端需重新定义redirect地址***
2. 用户扫码返回 ***pd\_code*** ***app\_id***
3. 获取token地址 `api/auth/token.json` 请求方式:get 参数: ***pd\_code*** ***app\_id***
4. 获取退出登录地址 `/api/auth/logout` 请求方式:get 参数:无

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance75

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~82 days

Recently: every ~589 days

Total

35

Last Release

134d ago

Major Versions

v1.0.8 → v2.0.12019-01-24

v2.1.13 → v3.0.12019-07-22

v3.0.2 → v4.0.02026-01-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/3872854a6aea1f16610c9b1125ee7058281d69223cdf9b5ed3396ff06a9fbee0?d=identicon)[xAmast](/maintainers/xAmast)

---

Top Contributors

[![i5shuyi](https://avatars.githubusercontent.com/u/58246546?v=4)](https://github.com/i5shuyi "i5shuyi (5 commits)")[![izpdavi](https://avatars.githubusercontent.com/u/7802716?v=4)](https://github.com/izpdavi "izpdavi (2 commits)")

### Embed Badge

![Health badge](/badges/waywake-auth-client/health.svg)

```
[![Health](https://phpackages.com/badges/waywake-auth-client/health.svg)](https://phpackages.com/packages/waywake-auth-client)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[jurager/teams

Laravel package to manage team functionality and operate with user permissions.

22817.3k](/packages/jurager-teams)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
