PHPackages                             bayuexiong/wxapp\_authorize - 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. bayuexiong/wxapp\_authorize

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

bayuexiong/wxapp\_authorize
===========================

v0.2(9y ago)31481MITPHPPHP &gt;=5.3

Since Dec 28Pushed 4y agoCompare

[ Source](https://github.com/bayuexiong/wxapp_authorize)[ Packagist](https://packagist.org/packages/bayuexiong/wxapp_authorize)[ RSS](/packages/bayuexiong-wxapp-authorize/feed)WikiDiscussions master Synced 4w ago

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

### Installation

[](#installation)

> composer require bayuexiong/wxapp\_authorize

### Basic Usage

[](#basic-usage)

##### Get SessionKey

[](#get-sessionkey)

```
require "vendor/autoload.php";

use Wxapp\Wechat\Auth;

$app_id = '';
$app_secret = '';
$code = '';

$auth = new Auth($app_id, $app_secret);

try {
    $data = $auth->authorize($code);
    $open_id = $data['openid'];
    $session_key = $data['session_key'];
} catch (Exception $e) {
    var_dump($e);
}
```

##### Decode UserInfo

[](#decode-userinfo)

```
$session_key = '';
$encrypt_data = '';
$iv = '';

$user = new User($app_id, $app_secret);
try {
    $info = $user->decode($session_key, $encrypt_data, $iv);
    $open_id = $info['openId'];
    $union_id = $info['unionId'];
catch (Exception $e) {
    var_dump($e);
}
```

### License

[](#license)

wxapp\_authorize is licensed under the MIT License - see the LICENSE file for details

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~125 days

Total

2

Last Release

3345d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10300823?v=4)[bayue](/maintainers/bayuexiong)[@bayuexiong](https://github.com/bayuexiong)

---

Top Contributors

[![bayuexiong](https://avatars.githubusercontent.com/u/10300823?v=4)](https://github.com/bayuexiong "bayuexiong (9 commits)")[![wangyue-ci](https://avatars.githubusercontent.com/u/47175735?v=4)](https://github.com/wangyue-ci "wangyue-ci (1 commits)")

---

Tags

wechat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bayuexiong-wxapp-authorize/health.svg)

```
[![Health](https://phpackages.com/badges/bayuexiong-wxapp-authorize/health.svg)](https://phpackages.com/packages/bayuexiong-wxapp-authorize)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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