PHPackages                             nddcoder/laravel-passport-iam - 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. nddcoder/laravel-passport-iam

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

nddcoder/laravel-passport-iam
=============================

Package for integrate laravel app with Passport IAM

v1.1.0(7y ago)016MITPHP

Since Jan 10Pushed 7y agoCompare

[ Source](https://github.com/dangdungcntt/laravel-passport-iam)[ Packagist](https://packagist.org/packages/nddcoder/laravel-passport-iam)[ RSS](/packages/nddcoder-laravel-passport-iam/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Integrate with Passport IAM
===========================

[](#integrate-with-passport-iam)

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

[](#installation)

You can install the package via composer:

```
composer require nddcoder/laravel-passport-iam
```

You can optionally publish the config file with:

```
php artisan vendor:publish --provider="Nddcoder\PassportIAM\IAMServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'base_url' => env('PASSPORT_IAM_BASE_URL'),
    'path' => [
        'oauth_token' => 'oauth/token',
        'user' => 'api/user'
    ],
    'client_id' => env('PASSPORT_IAM_CLIENT_ID'),
    'client_secret' => env('PASSPORT_IAM_CLIENT_SECRET'),
    'common_fields' => explode(',', env('PASSPORT_IAM_COMMON_FIELDS')),
    'mapping_field' => [
        'iam' => 'uuid',
        'local' => 'uuid'
    ]

];
```

Config
------

[](#config)

#### Update config/auth.php

[](#update-configauthphp)

```
return [
    //...
    'guards' => [
        //...

        'api' => [
            'driver' => 'access_token',
            'provider' => 'tokens',
        ],
        //...
    ],
    //...
    'providers' => [
        //...

        'tokens' => [
            'driver' => 'token',
            'model' => App\User::class,
        ]

        //...
    ]
];
```

#### Fill info in .env

[](#fill-info-in-env)

```
PASSPORT_IAM_BASE_URL=https://iam.domain.com
PASSPORT_IAM_CLIENT_ID=
PASSPORT_IAM_CLIENT_SECRET=

```

Usage
-----

[](#usage)

#### Login using email/password

[](#login-using-emailpassword)

```
use Nddcoder\PassportIAM\Services\IAMServiceInterface;

$reponse = app(IAMServiceInterface::class)->login(['email' => 'email@example.com', 'passord' => 'secret']);

/*
{
  "token_type": "Bearer",
  "expires_in": 2592000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI...",
  "refresh_token": "def50200ffa17b51e9e46117..."
}
*/
```

#### Valdiate token in request use middleware `auth:api`

[](#valdiate-token-in-request-use-middleware-authapi)

```
Route::group(['middleware' => ['auth:api']], function () {
    Route::get('/me', function(Request $request) {
        return $request->user();
    })
});
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

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

Total

4

Last Release

2588d ago

Major Versions

v0.1.0 → v1.0.02019-02-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/108944439?v=4)[nddzee](/maintainers/nddcoder)[@nddcoder](https://github.com/nddcoder)

---

Top Contributors

[![dangdungcntt](https://avatars.githubusercontent.com/u/22521948?v=4)](https://github.com/dangdungcntt "dangdungcntt (7 commits)")

### Embed Badge

![Health badge](/badges/nddcoder-laravel-passport-iam/health.svg)

```
[![Health](https://phpackages.com/badges/nddcoder-laravel-passport-iam/health.svg)](https://phpackages.com/packages/nddcoder-laravel-passport-iam)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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