PHPackages                             japseyz/apisecurity - 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. japseyz/apisecurity

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

japseyz/apisecurity
===================

Protects API routes with a token

1.0.12(9y ago)093MITPHP

Since Aug 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/JapSeyz/ApiSecurity)[ Packagist](https://packagist.org/packages/japseyz/apisecurity)[ RSS](/packages/japseyz-apisecurity/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

API SECURITY BY JAPSEYZ
=======================

[](#api-security-by-japseyz)

Install by running `composer require JapSeyz/ApiSecurity `and adding ` \JapSeyz\ApiSecurity\LaravelServiceProvider::class,` to config/app.php

Three Environment variables are included, one of them is optional

`JAPSEYZ_API_TOKEN`: which is the API Token used to secure the routes

`JAPSEYZ_APISECURITY_CHECK_AUTH`: Which skips authentication if the user is already authenticated. `JAPSEYZ_APISECURITY_DISABLE_IN_DEVELOPMENT` which skips authentication if the app is set to local environment

Add the "api.check" middleware to any routes that needs to be protected

Send along a header "X-server-token" with every request to the middleware; This headers value should equal the `JAPSEYZ_API_TOKEN` environment variable.

### Add the following route to your api.php if you cant access the one built into the package.

[](#add-the-following-route-to-your-apiphp-if-you-cant-access-the-one-built-into-the-package)

```
Route::get('/api/timestamp', function () {
  return response()->json([
      'timestamp' => time(),
  ]);
});
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Recently: every ~47 days

Total

6

Last Release

3431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33ad5acc22761cefe15f2c62d8d7d1f22b1faea6bd118f8dbc71ee753ff32b92?d=identicon)[JapSeyz](/maintainers/JapSeyz)

---

Top Contributors

[![JapSeyz](https://avatars.githubusercontent.com/u/2234034?v=4)](https://github.com/JapSeyz "JapSeyz (21 commits)")

### Embed Badge

![Health badge](/badges/japseyz-apisecurity/health.svg)

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

###  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)
