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 today

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 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

1366d 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

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[open-telemetry/opentelemetry-auto-laravel

OpenTelemetry auto-instrumentation for Laravel

592.7M9](/packages/open-telemetry-opentelemetry-auto-laravel)[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).

14845.8k1](/packages/guanguans-laravel-exception-notify)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[nightowl/agent

NightOwl monitoring agent — collects telemetry from laravel/nightwatch and writes to PostgreSQL

771.7k](/packages/nightowl-agent)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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