Download the PHP package juniyasyos/nexaid-client without Composer
On this page you can find all versions of the php package juniyasyos/nexaid-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juniyasyos/nexaid-client
More information about juniyasyos/nexaid-client
Files in juniyasyos/nexaid-client
Package nexaid-client
Short Description Laravel package for IAM SSO integration with JIT user provisioning
License proprietary
Informations about the package nexaid-client
Auth Bridge Client
Laravel package for IAM Single Sign-On (SSO), JWT verification, and JIT user provisioning.
Why use this package?
This package is designed for client applications that need to:
- authenticate users via IAM
- provision users automatically during login
- synchronize roles and application access
- verify tokens on every request
- support optional unit kerja sync
Highlights
- ✅ Minimal setup for a Laravel client
- ✅ IIS-compatible JWT verification
- ✅ JIT user provisioning from the IAM token
- ✅ Optional role sync with Spatie Permission
- ✅ Built-in IAM sync endpoints for user/role data
- ✅ Optional Livewire app switcher for current IAM applications
Requirements
- PHP
^8.1 - Laravel
^10.0 | ^11.0 | ^12.0 firebase/php-jwtspatie/laravel-permission(optional)
Quick setup
1. Install the package
2. Publish config
3. Run migrations
4. Set environment variables
5. Configure your User model
Use
statusinstead ofactive. The package expectsstatusvalues likeactive,inactive, orsuspended.
6. Configure routes
The package already registers the main IAM routes automatically when enabled.
If you need protected pages, use middleware:
7. Add a login link
Use the built-in login route:
Configuration overview
Open config/iam.php and adjust the following sections.
SSO settings
iam.app_key— IAM application keyiam.jwt_secret— shared JWT secret for validating tokensiam.base_url— public base URL of the IAM server (for browser redirects)iam.backchannel_url— internal base URL of the IAM server (for server-to-server API calls, e.g. Docker networking)iam.login_route/iam.callback_route— local login/callback URLsiam.default_redirect_after_login— where to send users after loginiam.guard— auth guard used by default
User sync settings
iam.user_fields— map database columns to JWT claimsiam.identifier_field— primary field used to identify usersiam.sync_users— exposes/api/iam/sync-usersfor IAM data requestsiam.sync_roles— enable role sync during provisioning
Token verification
iam.verify_each_request— validate token on every requestiam.attach_verify_middleware— automatically addiam.verifyinto thewebmiddleware group
Unit Kerja sync (optional)
iam.unit_kerja_field— JWT claim name for unit/org dataiam.require_unit_kerja— reject login if unit/org is missingiam.sync_unit_kerja— syncunitKerjas()relation on the user modeliam.unit_kerja_model— model for unit/org records
Routes registered by the package
The package exposes these routes when enabled:
Route API IAM didefinisikan di routes/iam-api.php, sedangkan route web SSO didefinisikan di routes/iam-client.php.
iam.sso.login— redirect user to IAM loginiam.sso.callback— handle callback and provisioningiam.logout— logout and clear IAM sessioniam.sync-users— endpoint permintaan data user dari client (read-only)iam.sync-roles— endpoint permintaan data role dari client (read-only)iam.client-roles— alias endpoint permintaan data role dari client (read-only)iam.push-roles— endpoint sinkronisasi role oleh IAM ke client appiam.push-users— endpoint sinkronisasi user oleh IAM ke client appiam.health— health check endpoint
Middleware aliases
iam.auth— ensures the user is authenticatediam.verify— verifies token on each requestiam.backchannel.verify— verifies IAM back-channel payload signatures
Usage steps for client apps
- Install the package and publish config.
- Run migrations.
- Set
IAM_ENABLED=true,IAM_APP_KEY,IAM_JWT_SECRET, andIAM_BASE_URL. - Confirm your
Usermodel hasiam_id,email,name, andstatus. - Protect routes with
iam.auth:web. - Add a login link using
route('iam.sso.login'). - If needed, publish views for customization:
Example token payload
IAM should send a JWT payload like:
Custom field mapping
Update config/iam.php:
Events
A successful login dispatches the IamAuthenticated event. Use it for auditing or custom actions.
License
This project is proprietary software.
Copyright © 2026 Ahmad Ilyas.
All Rights Reserved.
No permission is granted to use, modify, distribute, or sublicense this software without explicit written approval.
All versions of nexaid-client with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
firebase/php-jwt Version ^6.0
spatie/laravel-permission Version ^5.0|^6.0|^7.0|^8.0