PHPackages                             mggflow/lv-msvc-auth - 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. mggflow/lv-msvc-auth

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

mggflow/lv-msvc-auth
====================

v2.0.1(3y ago)0141MITPHP

Since Mar 8Pushed 3y agoCompare

[ Source](https://github.com/mggflow/lv-msvc-auth.php)[ Packagist](https://packagist.org/packages/mggflow/lv-msvc-auth)[ RSS](/packages/mggflow-lv-msvc-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

Laravel Microservice Authentication
===================================

[](#laravel-microservice-authentication)

About
-----

[](#about)

This package is using to apply AuthBase component in Laravel Microservice for request authentication.

Usage
-----

[](#usage)

To install:

```
composer require mggflow/lv-msvc-auth

```

Don`t forget to add database settings to `config/database.php`:

```
/**
 * Auth database settings
 */
'auth' => [
    'driver' => 'mysql',
    'url' => env('LV_MSVC_AUTH_DATABASE_URL', null),
    'host' => env('LV_MSVC_AUTH_DB_HOST', '127.0.0.1'),
    'port' => env('LV_MSVC_AUTH_DB_PORT', '3306'),
    'database' => env('LV_MSVC_AUTH_DB_DATABASE', 'auth'),
    'username' => env('LV_MSVC_AUTH_DB_USERNAME', 'root'),
    'password' => env('LV_MSVC_AUTH_DB_PASSWORD', ''),
    'unix_socket' => env('LV_MSVC_AUTH_DB_SOCKET', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'prefix_indexes' => true,
    'strict' => true,
    'engine' => null,
    'options' => extension_loaded('pdo_mysql') ? array_filter([
        PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
    ]) : [],
],

```

And auth settings to `config/msvc.php`:

```
'auth' => [
    'connection_name' => env('LV_MSVC_AUTH_CONNECTION_NAME', 'auth'),
    'users_table' => env('LV_MSVC_AUTH_USERS_TABLE', 'users'),
    'cookie_key' => env('LV_MSVC_AUTH_COOKIE_KEY', 'au'),
    'token_header_name' => env('LV_MSVC_AUTH_TOKEN_HEADER_NAME', 'Auth-Access-Token'),
]

```

Env:

```
LV_MSVC_AUTH_TOKEN_HEADER_NAME=Auth-Access-Token
LV_MSVC_AUTH_CONNECTION_NAME=auth
LV_MSVC_AUTH_USERS_TABLE=users
LV_MSVC_AUTH_COOKIE_KEY=au

LV_MSVC_AUTH_DATABASE_URL=
LV_MSVC_AUTH_DB_HOST=127.0.0.1
LV_MSVC_AUTH_DB_PORT=3306
LV_MSVC_AUTH_DB_SOCKET=
LV_MSVC_AUTH_DB_DATABASE=auth
LV_MSVC_AUTH_DB_USERNAME=root
LV_MSVC_AUTH_DB_PASSWORD=

```

Authenticate facade usage example:

```
$password = $request->input('password', false);
$username = $request->input('username', false);
$email = $request->input('email', false);
$token = $request->header($this->authHeaderName, $request->input('token', false));

$this->authenticateFacade = new Authenticate();
$authenticateFacade->auth($password, $username, $email, $token);

// object|null
$currentUser = $authenticateFacade->getCurrentUser();

```

AuthRequest case usage example:

```
$requestAuthentication = new AuthRequest();
$currentUser = $requestAuthentication->auth($request)->getCurrentUser();

```

AuthenticateRequestUser trait usage example:

```
class AuthenticateRequestUserUsage
{
    use AuthenticateRequestUser;

    public someFunction($request){
        $this->authRequestUser($request);

        if(!$this->userIsAuthenticated()){
            throw new AccessDenied();
        }

        $user = $this->currentUser;
    }
}

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Total

4

Last Release

1158d ago

Major Versions

v1.0.1 → v2.0.02023-03-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90987388?v=4)[MGGFLOW](/maintainers/MGGFLOW)[@mggflow](https://github.com/mggflow)

### Embed Badge

![Health badge](/badges/mggflow-lv-msvc-auth/health.svg)

```
[![Health](https://phpackages.com/badges/mggflow-lv-msvc-auth/health.svg)](https://phpackages.com/packages/mggflow-lv-msvc-auth)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

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