PHPackages                             reiterus/microapi-secure - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. reiterus/microapi-secure

ActiveProject[HTTP &amp; Networking](/categories/http)

reiterus/microapi-secure
========================

MicroApi Secure is a small API engine based on MicroApi Core and Symfony packages.

1.6.0(3y ago)6113MITPHPPHP ^8.1

Since Apr 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/reiterus/microapi-secure)[ Packagist](https://packagist.org/packages/reiterus/microapi-secure)[ RSS](/packages/reiterus-microapi-secure/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (11)Used By (0)

MicroApi Secure
===============

[](#microapi-secure)

MicroApi Secure is a small engine for creating **application APIs**based on Symfony packages, which is a development of [MicroApi Core](https://github.com/reiterus/microapi-core) and contains security tools. Since MicroApi is based on the Symfony architecture, it can be developed to **any level of complexity** if desired. Forming your application based on this engine, you will always be sure that there is **nothing superfluous** in your code.

### Features of MicroApi Secure out of the box

[](#features-of-microapi-secure-out-of-the-box)

- ability to
    - create secure endpoints
    - use JWT-tokens
- authentication examples `base`, `json` and `token`
- example of using a provider
    - **in-memory**
    - **in-json**
- users list in a JSON-file
- PhpStorm [http requests](http/admin.http) files
- custom logger with named channels
- 3 configuration files
- examples of **testing REST API** endpoints

See also [core features](https://github.com/reiterus/microapi-core#microapi-core).

#### Join the development of MicroApi!

[](#join-the-development-of-microapi)

Usage
-----

[](#usage)

It's very simple! Just run these two commands:

- `composer create-project reiterus/microapi-secure folder && cd folder`
- `make docker-start`

That's all!
Now your API app is available at

JWT
---

[](#jwt)

To get JWT-token just send http-request to endpoint. For example, `/admin`.

To check/decode this token send request to `jwt/decode` endpoint.

```
GET http://localhost:8009/jwt/decode
Authorization: Bearer some.jwt-token
```

JWT-token structure:

```
{
  "iat": 1681036036,
  "exp": 1681036336,
  "sub": "admin.email@yandex.ru",
  "user": {
    "username": "admin",
    "email": "admin.email@yandex.ru",
    "roles": [
      "ROLE_ADMIN"
    ]
  }
}
```

Logger
------

[](#logger)

```
# run command
docker-compose logs -ft api | grep MICROAPI
# get log info
MICROAPI: TOKEN_ACCESS: Invalid Access Token {"token":"wrong.token.manager"}
```

Makefile commands
-----------------

[](#makefile-commands)

For the convenience of working with the project, there are several [make-commands](commands.md): local and for Docker.

Examples
--------

[](#examples)

Default response at `/admin` endpoint

```
{
  "page": "Admin Account",
  "identifier": "admin",
  "roles": [
    "ROLE_ADMIN"
  ]
}
```

Installation
------------

[](#installation)

You can install the project in two ways

From packagist.org

```
composer create-project reiterus/microapi-secure
```

From GitHub repository

```
{
 "repositories": [
  {
   "type": "vcs",
   "url": "https://github.com/reiterus/microapi-secure.git"
  }
 ]
}
```

License
-------

[](#license)

This library is released under the [MIT license](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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

Total

10

Last Release

1133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3c300a9744787c72fad2780b61af83d28d9b5423153094d164c8d866945aa36?d=identicon)[reiterus](/maintainers/reiterus)

---

Top Contributors

[![reiterus](https://avatars.githubusercontent.com/u/108575805?v=4)](https://github.com/reiterus "reiterus (33 commits)")

---

Tags

apiapi-restjson-loginjson-userjwtjwt-tokenmicroapiphpphp81reiterusrest-apisymfonyjwtapisymfonyresttokensecureenginemicroapireiterus

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/reiterus-microapi-secure/health.svg)

```
[![Health](https://phpackages.com/badges/reiterus-microapi-secure/health.svg)](https://phpackages.com/packages/reiterus-microapi-secure)
```

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k58.7M210](/packages/lexik-jwt-authentication-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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