PHPackages                             xlwl/authserver - 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. xlwl/authserver

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

xlwl/authserver
===============

Unified Authorization Service SDK

127[2 PRs](https://github.com/z940166317/authserver/pulls)PHP

Since Aug 1Pushed 3y agoCompare

[ Source](https://github.com/z940166317/authserver)[ Packagist](https://packagist.org/packages/xlwl/authserver)[ RSS](/packages/xlwl-authserver/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

XL authServer client
====================

[](#xl-authserver-client)

##### 当前支持趣头条 `qtt` 微信 `weixin` 魅族 `meizu` OPPO `oppo` 百度 `baidu` 手QQ `sqq` 扩展中. . .

[](#当前支持趣头条-qtt-微信-weixin-魅族-meizu-oppo-oppo-百度-baidu--手qq-sqq-扩展中--)

- Install

```
composer require xlwl/authserver

```

- Quick start

```
use xlauth\serverFactory;

$serverFactory = new serverFactory('test'); /*实例化平台*/

$testServer = $serverFactory->getServer();  /*获取服务*/
$testServer->setAppCode('test');    /*设置app*/

$testServer->setClientId('s5oK0ruYn3HAhhycmaZh')->setSecret('9VMDvvVWPLpRcWKJmpzzKNAsorZl0Mu2k0u0f4aoosKSqGllKH')->setParams(['sessionKey' => '3ae285219845205c98985081a75439405caf64a8']); /*设置clientId、secret、请求参数*/
//or set host port
$testServer->setHost('http://www.xxx.com')->setPort('')->setClientId('s5oK0ruYn3HAhhycmaZh')->setSecret('9VMDvvVWPLpRcWKJmpzzKNAsorZl0Mu2k0u0f4aoosKSqGllKH')->setParams(['sessionKey' => '3ae285219845205c98985081a75439405caf64a8']); /*设置clientId、secret、请求参数*/

try{
    $ret = $testServer->token();    /*获取token和用户信息*/
//    $ret = $testServer->getUserInfoByToken('025220AA1132CA46EE63C616F5C210BF'); /*通过token获取用户信息*/
//    $ret = $testServer->getTokenByrRefreshToken('3e3bca9eed66499a03e16378fbd7173e');    /*通过refertoken生成新的token*/
}catch (Exception $e){
    print_r($e->getMessage());
    die();
}

print_r($ret);
```

- Explain

```
//不同平台认证需要参数不同，需要根据实际情况设置
$testServer->setParams(['code' => $code]); /*微信*/
$testServer->setParams(['ticke' => $ticket,'paltform' => $platform]);   /*趣头条*/
//或者......
$testServer->setSessionKey($sessionKey)->setOtherParam($param)
```

[Detailed](./DESCRIPTION.md)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d30ec87b7cc59395c2152609cc94a22439cfa32c4cd48ab1475b070d4445bc7?d=identicon)[Aaronz](/maintainers/Aaronz)

---

Top Contributors

[![z940166317](https://avatars.githubusercontent.com/u/24587171?v=4)](https://github.com/z940166317 "z940166317 (8 commits)")

### Embed Badge

![Health badge](/badges/xlwl-authserver/health.svg)

```
[![Health](https://phpackages.com/badges/xlwl-authserver/health.svg)](https://phpackages.com/packages/xlwl-authserver)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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