PHPackages                             ella123/hyperf-auth - 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. ella123/hyperf-auth

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

ella123/hyperf-auth
===================

3.1.11(11mo ago)059MITPHPPHP &gt;=8.0

Since Sep 13Pushed 11mo ago1 watchersCompare

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

READMEChangelog (5)Dependencies (17)Versions (8)Used By (0)

qbhy/hyperf-auth
================

[](#qbhyhyperf-auth)

hyperf 的 auth 组件，目前支持 jwt、session、sso 驱动。用户可以自行扩展。
本组件参考了 laravel 的 auth 组件设计，使用体验大体和 laravel 的 auth 差不多。

[![Latest Stable Version](https://camo.githubusercontent.com/fe61f9f91052fbcc5a193b5cfef37e7b0776c382be82fb61b3a185a732068f8e/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f762f737461626c65)](https://packagist.org/packages/ella123/hyperf-auth)[![Total Downloads](https://camo.githubusercontent.com/f52df282b1735a9fba21fb56ca43b0692a9263882864e0fb6acbb3a02180c80e/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f646f776e6c6f616473)](https://packagist.org/packages/ella123/hyperf-auth)[![Latest Unstable Version](https://camo.githubusercontent.com/04caa36837f9364d0cadb7b61bd222dff8d960dc7d40d09c97a4726f1768c9e7/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f762f756e737461626c65)](https://packagist.org/packages/ella123/hyperf-auth)[![License](https://camo.githubusercontent.com/02b1262033ffd669b22c68fa286287fbd177c94a4de39ed1220e3523fe56991b/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f6c6963656e7365)](https://packagist.org/packages/ella123/hyperf-auth)[![Monthly Downloads](https://camo.githubusercontent.com/6cdc1b1a2859df065e9274b2ad0ec7dc770697a2ca2e5ba02845dabd533d657e/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f642f6d6f6e74686c79)](https://packagist.org/packages/ella123/hyperf-auth)[![Daily Downloads](https://camo.githubusercontent.com/3785d439c7e63abc6a87dcdd25dd07474176338b56a9ca6cd2bed325286cbe20/68747470733a2f2f706f7365722e707567782e6f72672f656c6c613132332f6879706572662d617574682f642f6461696c79)](https://packagist.org/packages/ella123/hyperf-auth)

支持的验证方式
-------

[](#支持的验证方式)

- session
- jwt
- sso （单点登录，继承自jwt，需要 hyperf/redis，支持多客户端）

安装 - install
------------

[](#安装---install)

```
composer require ella123/hyperf-auth
```

配置 - configuration
------------------

[](#配置---configuration)

使用 `ELLa123\HyperfAuth\AuthExceptionHandler` ，此步骤可选，开发者可以自行捕捉 `AuthException` 和 `JWTException` 进行处理

```
