PHPackages                             clearswitch/signatrue - 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. clearswitch/signatrue

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

clearswitch/signatrue
=====================

api signatrue

0.1.2(5y ago)012MITPHP

Since Apr 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ClearSwicth/signatrue)[ Packagist](https://packagist.org/packages/clearswitch/signatrue)[ RSS](/packages/clearswitch-signatrue/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Laravel-signatrue
=================

[](#laravel-signatrue)

基于laravel 的接口的签名的验证

在config/auth.php 中的guards中 注册守卫者
--------------------------------

[](#在configauthphp-中的guards中-注册守卫者)

```
'mytoken'=>[
            'driver' => 'signatrue',
            'provider' => 'AdminUser',
        ]
'AdminUser' => [
            'driver' => 'eloquent',
            'model' => App\Models\AdminUser::class,
        ],
```

\##数据库的模型自己定义，但是数据biao 必须要有

```
username；api_token；token_expired_at 这三个字段
```

在App\\Providers\\AuthServiceProvider.php 中的bool中设置 签名，api\_token 的过期时间
----------------------------------------------------------------------

[](#在appprovidersauthserviceproviderphp-中的bool中设置-签名api_token-的过期时间)

```
use ClearSwitch\Signatrue\Signature;
Signature::setTokenPeriod(时间戳);
Signature::setVailRequestPeriod(时间戳);
```

\##路由中间的调用

```
Route::middleware('auth.signatrue')
```

\##请求参数中必须要有三个参数

```
ts,user_id,sign
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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 ~2 days

Total

3

Last Release

1832d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47359?v=4)[The Apache Software Foundation](/maintainers/Apache)[@apache](https://github.com/apache)

---

Top Contributors

[![ClearSwicth](https://avatars.githubusercontent.com/u/47941313?v=4)](https://github.com/ClearSwicth "ClearSwicth (1 commits)")

---

Tags

apiauthsignatrue

### Embed Badge

![Health badge](/badges/clearswitch-signatrue/health.svg)

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

###  Alternatives

[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.0M247](/packages/league-oauth2-server)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M67](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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