New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

amin3536/laravel-api-user-provider

this package help you to provide your user from different service ( useful in micro service specially )
2,057 11

Larablocks Analysis

amin3536/laravel-api-user-provider works with Laravel 7, 8 and 9 (latest release v1.0.9, Aug 11, 2022), all past end of life (the last on Feb 6, 2024): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 7, 8 and 9, past end of life since Feb 6, 2024
  • No release in the last 12 months (last: Aug 11, 2022)
  • 0 downloads a month (needs 10,000)
  • 11 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 11, 2022.
  • No releases in the last 12 months.
  • First released: Feb 20, 2021.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.

Install
composer require amin3536/laravel-api-user-provider
Latest Version:v1.0.9
Laravel:7 · 8 · 9
License:MIT
Last Updated:Aug 22, 2022
Links: GitHub  ·  Packagist
Maintainer: amin3520

LaravelApiUserProvider

Latest Version on Packagist Total Downloads tests workflow StyleCI

this pack help you to provide your user from different service ( useful in micro service )

how this package work

this package use bearer token in header's request and provide user from Sec Service (Auth service)

Installation

Via Composer

$ composer require amin3536/laravel-api-user-provider

Usage

simple usage this driver : change your auth.php in config like below

<?php

return [
    
        //.......
    /*
    |--------------------------------------------------------------------------
    | Authentication Guards
    |--------------------------------------------------------------------------
    */
    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'api-token',
            'provider' => 'users',
        ],

        'admin-api' => [
            'driver' => 'api-token',
            'provider' => 'admins',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | User Providers
    |--------------------------------------------------------------------------
    |
    */

    'providers' => [
        'users' => [
            'driver' => 'api-provider',
            'model' => App\Models\User::class,
           //merged with base_url or you can use full path api here  =>http://localhost/api/admin/
            'url' => '/api/v1/user/'
        ],
        'admins' => [
            'driver' => 'api-provider',
            'model' => App\Models\Admin::class,
            'url' => '/api/v1/admin/'
        ],
    ],
     /*
        |--------------------------------------------------------------------------
        | Base url path to to call Auth Service 
        |--------------------------------------------------------------------------
        |
        */
        'base-url'=>'localhost',
        'TimeoutForRequestAuthServer'=>2
    //.......
];

advance

if you want use custom Deserializer class ,the class must be implement DeserializerInterface and add below code in boot method of AuthServiceProvider .

<?php
    //...
    public function boot()
    {

        $this->app->when(ExternalUserProvider::class)
            ->needs(DeserializerInterface::class)
            ->give(function () {
                return new JsonToModel();
            });
    }
    

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released Laravel License
v1.0.9 ~7|~8|~9 MIT
v1.0.8 ~7|~8 MIT
v1.0.7 ~7|~8 MIT
v1.0.6 ~7|~8 MIT
v1.0.5 ~7|~8 MIT