keloola / keloola-sso-authorize
Keloola Authorize with SSO
v1.1.4
2025-06-25 07:32 UTC
Requires
- php: ^8.0|^8.2
- illuminate/support: ^10.0|^11.0|^12
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10
- phpunit/phpunit: ^10.5|^11.0
README
Installation
You can install the package via composer:
composer require keloola/keloola-sso-authorize
Usage
Publish config :
php artisan vendor:publish --tag=keloola-auth-config
KELOOLA_AUTH_APP_ID=xxx //app id KELOOLA_AUTH_SSO_HOST=https://accounts.keloola.xyz KELOOLA_AUTH_CACHE_EXPIRED=60 KELOOLA_AUTH_ACCOUNTING_HOST=host api accounting KELOOLA_AUTH_ACCOUNTING_ENCRYPT=false //jika accounting tidak di encrypt response dan request nya KELOOLA_AUTH_ACCOUNTING_APP_KEY=xxx //jika encrypt true ini require dengan app key accounting
Setup Middleware Sso and Accounting You can use on global middlware Location : project-laravel/bootstrap/app.php use Keloola\KeloolaSsoAuthorize\Http\Middleware\KeloolaAuthMiddleware; ->withMiddleware(function (Middleware $middleware) { $middleware->api(append: [ KeloolaAuthMiddleware::class, ]); }) If you want to connect the keloola accounting , you must be use KeloolaAuthAccountingMiddleware use Keloola\KeloolaSsoAuthorize\Http\Middleware\KeloolaAuthAccountingMiddleware; Add before KeloolaAuthMiddleware::class ->withMiddleware(function (Middleware $middleware) { $middleware->api(append: [ KeloolaAuthMiddleware::class, KeloolaAuthAccountingMiddleware::class, <----- disini ]); }) or via routes Route::middleware([KeloolaAuthMiddleware::class, KeloolaAuthAccountingMiddleware::class]) ->group(function () { Route::get('/example', function () { return 'OK'; }); });
Consume Data
Sso User Data $request->sso_user; Accunting Data $request->accounting_user
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email roni.jakarianto@thrive.co.id instead of using the issue tracker.