businessprocess/oidc-auth

Package for JWT token auth

v1.0.7 2024-11-27 10:42 UTC

This package is auto-updated.

Last update: 2025-01-27 10:57:08 UTC


README

JWT token auth service

PHP 8.x Laravel 8.x Yii 2.x Latest Stable Version Release date Release Version Total Downloads Pull requests Software License Stars

Notification messenger channel to Laravel FrameWork v6.0 and above.

Installation

The recommended way to install package is through Composer.

composer require businessprocess/oidc-auth

Usage Laravel

Use middleware 'auth:oidc'

\Illuminate\Support\Facades\Route::middleware(['auth:oidc'])->group(fn() => {

})

Configuration setting

Add to auth config file

//Guard
    [
        'driver' => 'oidc',
        'provider' => null, // if null return OidcUser model 
        'decoder' => null, // Jwt token decoder (JwtDecoder), if null use service decoder
    ]

Configuration model

class User extends Authenticatable
{
    use \OidcAuth\HasJwtToken;
}

Available Methods