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

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

k99k5/hyperf-auth
=================

hyperf 的 auth 组件

1.0(7mo ago)033MITPHPPHP &gt;=8.1

Since Oct 15Pushed 7mo agoCompare

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

READMEChangelog (1)Dependencies (19)Versions (2)Used By (0)

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

[](#qbhyhyperf-auth)

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

[![Latest Stable Version](https://camo.githubusercontent.com/20fcdc83847105b1b814d64d742d8795e6d3e1d56190ae5a146bdd6f0fdbdaf9/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f762f737461626c65)](https://packagist.org/packages/96qbhy/hyperf-auth)[![Total Downloads](https://camo.githubusercontent.com/b66c33d41df40edae2c7bfe5d0c8bc1042d3e581ba998b0b95f396a209030758/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f646f776e6c6f616473)](https://packagist.org/packages/96qbhy/hyperf-auth)[![Latest Unstable Version](https://camo.githubusercontent.com/bb375b2bec81de372748600081664031222ea655dfded66c6f5d95cde992b81e/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f762f756e737461626c65)](https://packagist.org/packages/96qbhy/hyperf-auth)[![License](https://camo.githubusercontent.com/7cc526bf559143e49c52069cb6abf3e16b42d49c9bb00977eac1b74c3eac8b98/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f6c6963656e7365)](https://packagist.org/packages/96qbhy/hyperf-auth)[![Monthly Downloads](https://camo.githubusercontent.com/37968caac8da36d30a6727434cf143cbaf7a594d54002aac6abd5fb4c991a4b4/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f642f6d6f6e74686c79)](https://packagist.org/packages/96qbhy/hyperf-auth)[![Daily Downloads](https://camo.githubusercontent.com/21aebac7a782a424979dcfceb517d61f7190e5d9c32b54156152c2694bdf2c2f/68747470733a2f2f706f7365722e707567782e6f72672f3936716268792f6879706572662d617574682f642f6461696c79)](https://packagist.org/packages/96qbhy/hyperf-auth)

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

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

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

> 任何问题请加QQ群提问：873213948

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

[](#安装---install)

```
$ composer require 96qbhy/hyperf-auth
```

> hyperf 1.1 请使用 ^v1.0 版本

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

[](#配置---configuration)

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

```
