PHPackages                             devianl2/service-logging - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. devianl2/service-logging

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

devianl2/service-logging
========================

Microservice logging

1.0.1(3y ago)060MITPHP

Since Aug 11Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Tenant Auth
===========

[](#tenant-auth)

Tenant auth is a laravel package that validate JWT token and its claim properties and set into request header

For each microservice development, you need to follow instruction below to ensure the application is standardize.

Step 1:
-------

[](#step-1)

Install from composer

```
composer require devianl2/tenant-auth
```

Run the following command for public key config

```
php artisan vendor:publish --provider="Tenant\Auth\TenantAuthProvider"
```

Step 2:
-------

[](#step-2)

To use this package, make sure any **API request** does have Authorization header and **Web request** does have Authorization key in cookie

Go to **App\\Http\\Middleware\\Kernel** and add the following syntax

```
 protected $middleware = [
        // \App\Http\Middleware\TrustHosts::class,
        \App\Http\Middleware\TrustProxies::class,
        ...
        **\Tenant\Auth\Middleware\TenantAuthMiddleware::class**
    ];
```

Step 3 (Optional:
-----------------

[](#step-3-optional)

If you are using in $routeMiddleware and define the middleware group by your own, you may do the following action:

Go to App\\Http\\Kernel to add your own route middleware like following:

```
protected $routeMiddleware = [
        .....
        'tenant-auth'   =>  \Tenant\Auth\Middleware\TenantAuthMiddleware::class
    ];
```

Go to App\\Http\\Middleware\\EncryptCookies and add Authorization into except array because Laravel Cookie has encrpytion for all values by default but the Authorization token encrpytion is not needed in this case since it was generated by gateway.

```
protected $except = [
        'Authorization'
    ];
```

Go to **App\\Http\\Middleware\\Kernel** and add the following syntax

```
 protected $middleware = [
        // \App\Http\Middleware\TrustHosts::class,
        \App\Http\Middleware\TrustProxies::class,
        ...
        **\Tenant\Auth\Middleware\TenantAuthMiddleware::class**
    ];
```

### Note:

[](#note)

This package will automatic extract the following information if JWT token is valid:

- x-user-uuid (Current user's uuid)
- x-tenant-uuid (Current user's tenant id)
- x-tenant-url (Current user's tenant url)
- x-scopes (Current user's permissions / json encoded)
- x-roles (Current user's roles. E.g: admin/users. / Json encoded)
- x-modules (Module that user could access / json encoded)

You may use $request to extract the information in controller E.g $request-&gt;header('x-user-uuid');

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

1311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/258988219cf511bbd9c2809a6ba1653006dee578e2db26cb813aa99f6a24a319?d=identicon)[devianl2](/maintainers/devianl2)

---

Top Contributors

[![devianl2](https://avatars.githubusercontent.com/u/23150573?v=4)](https://github.com/devianl2 "devianl2 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devianl2-service-logging/health.svg)

```
[![Health](https://phpackages.com/badges/devianl2-service-logging/health.svg)](https://phpackages.com/packages/devianl2-service-logging)
```

###  Alternatives

[overtrue/laravel-query-logger

A dev tool to log all queries for laravel application.

413307.5k6](/packages/overtrue-laravel-query-logger)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[regulus/activity-log

A clean and simple Laravel 5 activity logger for monitoring user activity on a website or web application.

164220.1k2](/packages/regulus-activity-log)

PHPackages © 2026

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