PHPackages                             ypa/abstract-api - 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. [Security](/categories/security)
4. /
5. ypa/abstract-api

ActivePackage[Security](/categories/security)

ypa/abstract-api
================

Abstract package for extra security in API's

2.1.0(6y ago)03.1kMIT

Since Apr 8Pushed 6y agoCompare

[ Source](https://github.com/your-personal-agency/laravel-abstract-api)[ Packagist](https://packagist.org/packages/ypa/abstract-api)[ Fund](https://bunq.me/joskoomen)[ Fund](https://paypal.me/nuofstraks)[ RSS](/packages/ypa-abstract-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (14)Used By (0)

Laravel &amp; Lumen Abstract API Security
=========================================

[](#laravel--lumen-abstract-api-security)

### Laravel

[](#laravel)

1. Add the Service Provider to `config/app.php`

```
/*
 * Package Service Providers...
 */
\Ypa\AbstractApi\AbstractApiServiceProvider::class,

```

2. Run `php artisan vendor:publish` to publish the config file;
3. Add the `.env` variables and their values;
4. Add the middleware in `App\Http\Kernel.php` to `$routeMiddleware`

```
'abstract.api' => \Ypa\AbstractApi\AbstractApiMiddleware::class,

```

5. And i advice to add it to the `api` group in the same file:

```
'api' => [
    'throttle:60,1',
    'bindings',
    'abstract.api
],

```

6. For sending you can add the `AbstractApiValidationTrait` to your controller.
7. Right before your API request you can use the following method:

```
$form_params = $this->addTimeAndSignature(request()->all());

```

That's it!

### Lumen

[](#lumen)

1. Add the `.env` variables and their values;

```
YPA_ABSTRACT_API_TIME_DIFFERENCES=30
YPA_ABSTRACT_API_HASH_SECRET="${APP_KEY}"
YPA_ABSTRACT_API_HASHTYPE=sha512
YPA_ABSTRACT_API_DEBUG=true
YPA_ABSTRACT_API_DISABLE=false

```

2. Add the middleware in your bootstrap file.

```
$app->routeMiddleware([
    'abstract.api' => \Ypa\AbstractApi\AbstractApiMiddleware::class,
]);,

```

3. Add the middleware to your routes you want to secure like any other middleware in Lumen.
4. For sending you can add the `AbstractApiValidationTrait` to your controller.
5. Right before your API request you can use the following method:

```
$form_params = $this->addTimeAndSignature(request()->all());

```

That's it!

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

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

Recently: every ~43 days

Total

12

Last Release

2210d ago

Major Versions

1.6.0 → 2.0.02020-04-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/720590?v=4)[Jos Koomen](/maintainers/joskoomen)[@joskoomen](https://github.com/joskoomen)

---

Top Contributors

[![joskoomen](https://avatars.githubusercontent.com/u/720590?v=4)](https://github.com/joskoomen "joskoomen (57 commits)")

### Embed Badge

![Health badge](/badges/ypa-abstract-api/health.svg)

```
[![Health](https://phpackages.com/badges/ypa-abstract-api/health.svg)](https://phpackages.com/packages/ypa-abstract-api)
```

###  Alternatives

[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[craftpulse/craft-password-policy

Password Policy plugin

2826.0k1](/packages/craftpulse-craft-password-policy)[liquidweb/ssl-certificate

A class to easily query the properties of and validate the status of an ssl certificate

183.7k](/packages/liquidweb-ssl-certificate)

PHPackages © 2026

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