PHPackages                             big-dream/cdn-url-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. big-dream/cdn-url-auth

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

big-dream/cdn-url-auth
======================

CDN URL地址鉴权

0.0.2(5y ago)4520↑200%22Apache-2.0PHPPHP &gt;=5.4.7

Since Aug 20Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (2)

CDN URL地址鉴权
===========

[](#cdn-url地址鉴权)

腾讯CDN鉴权链接生成、阿里云CDN鉴权链接生成。

安装
--

[](#安装)

```
composer require big-dream/cdn-url-auth:0.0.2

```

使用示例
----

[](#使用示例)

### 腾讯云CDN鉴权链接地址生成使用示例

[](#腾讯云cdn鉴权链接地址生成使用示例)

初始化类：

```
$auth = new \bigDream\CdnUrlAuth\Tencent(
    'r1u1sxtmgf8u5u9eazh2wpj',  // [必传]鉴权秘钥
    'sign',                     // [选传]鉴权参数名（鉴权方式TypeA和TypeD会用到）
    't',                        // [选传]时间参数名（鉴权方式TypeD会用到）
    false                       // [选传]将时间戳十六进制（鉴权方式TypeD会用到）
);
```

#### TypeA鉴权方式

[](#typea鉴权方式)

```
$auth->typeA(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time(),                                     // [选传]当前时间的时间戳
    md5(microtime()),                           // [选传]随机数
    '0'                                         // [选传]用户ID
);
```

#### TypeB鉴权方式

[](#typeb鉴权方式)

```
$auth->typeB(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time()                                      // [选传]当前时间的时间戳
);
```

#### TypeC鉴权方式

[](#typec鉴权方式)

```
$auth->typeC(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time()                                      // [选传]当前时间的时间戳
);
```

#### TypeD鉴权方式

[](#typed鉴权方式)

```
$auth->typeD(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time()                                      // [选传]当前时间的时间戳
);
```

### 阿里云CDN鉴权链接地址生成使用示例

[](#阿里云cdn鉴权链接地址生成使用示例)

初始化类：

```
$auth = new \bigDream\CdnUrlAuth\Aliyun(
    'r1u1sxtmgf8u5u9eazh2wpj',  // [必传]鉴权秘钥
    'auth_key',                 // [选传]鉴权参数名（鉴权方式TypeA和TypeD会用到）
    3600                        // [选传]链接有效期（秒）
);
```

#### TypeA鉴权方式

[](#typea鉴权方式-1)

```
$auth->typeA(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time(),                                     // [选传]链接失效时间的时间戳
    md5(microtime()),                           // [选传]随机数
    '0'                                         // [选传]用户ID
);
```

#### TypeB鉴权方式

[](#typeb鉴权方式-1)

```
$auth->typeB(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time()                                      // [选传]链接失效时间的时间戳
);
```

#### TypeC鉴权方式

[](#typec鉴权方式-1)

```
$auth->typeC(
    '/files/install/wampserver3.2.3_x64.exe',   // [必传]需要鉴权的链接
    time()                                      // [选传]链接失效时间的时间戳
);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

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.

###  Release Activity

Cadence

Every ~19 days

Total

2

Last Release

2071d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1297b521c54f7845f4f997452b740d8a2ea63bafebfed6e6b4275b0b0cce11eb?d=identicon)[jwj](/maintainers/jwj)

---

Top Contributors

[![big-dream](https://avatars.githubusercontent.com/u/9215157?v=4)](https://github.com/big-dream "big-dream (7 commits)")

---

Tags

urlAuthenticationaliyuncdntencent

### Embed Badge

![Health badge](/badges/big-dream-cdn-url-auth/health.svg)

```
[![Health](https://phpackages.com/badges/big-dream-cdn-url-auth/health.svg)](https://phpackages.com/packages/big-dream-cdn-url-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M348](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[pragmarx/google2fa

A One Time Password Authentication package, compatible with Google Authenticator.

2.0k82.4M164](/packages/pragmarx-google2fa)[paragonie/sodium_compat

Pure PHP implementation of libsodium; uses the PHP extension if it exists

934131.6M155](/packages/paragonie-sodium-compat)

PHPackages © 2026

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