Download the PHP package notrel/laravel-wso2is without Composer
On this page you can find all versions of the php package notrel/laravel-wso2is. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download notrel/laravel-wso2is
More information about notrel/laravel-wso2is
Files in notrel/laravel-wso2is
Package laravel-wso2is
Short Description A Laravel package for integrating with WSO2 Identity Server
License MIT
Informations about the package laravel-wso2is
Laravel WSO2 Identity Server
A Laravel package for integrating with WSO2 Identity Server, providing OAuth2 authentication, user management, SCIM2 API access, and convenient middleware for session management.
Features
- 🔐 OAuth2/OIDC Authentication - Complete OIDC flow with login, callback, and logout
- 👥 User Management - SCIM2 API for user CRUD operations
- 👪 Group Management - SCIM2 API for group operations
- 🏢 Application Management - WSO2IS REST API for application configuration
- 🛡️ Session Middleware - Automatic token validation and refresh
- 📝 Request Classes - Laravel-style request classes for clean authentication flows
- ✅ Pest Testing - Comprehensive test suite with Pest framework
Installation
You can install the package via composer:
The package will automatically register its service provider.
Configuration
Add your WSO2IS configuration to your config/services.php file:
Then update your .env file:
Usage
Authentication with Request Classes (Recommended)
The package provides convenient request classes similar to Laravel WorkOS. You create the routes and controllers in your application:
1. Create Your Authentication Routes
2. Or Create a Controller
3. Update Your Configuration
Make sure your redirect URI points to your callback route:
Session Middleware
Protect your routes with automatic token validation and refresh by adding the middleware to your routes:
User Model
The package includes a rich User model with role and group checking:
Using the HTTP Client (Advanced)
User Management
Group Management
Application Management
OAuth2 Authentication Flow
The package provides request classes to handle OAuth2 authentication flows. You'll need to set up your own routes and controllers:
To initiate the OAuth2 flow, redirect users to your WSO2IS authorization endpoint:
Testing
Run the test suite using Pest:
Or directly:
Integration Testing with Real WSO2IS
To test against a real WSO2 Identity Server instance:
1. Setup WSO2IS Application
- Start WSO2 Identity Server
- Access Management Console:
https://localhost:9443/carbon - Login with admin credentials
- Create a new OAuth application:
- Go to Main > Identity > Service Providers
- Click Add and create a new service provider
- Configure Inbound Authentication Configuration > OAuth/OpenID Connect
- Add required scopes:
internal_user_mgt_*,internal_group_mgt_*,internal_application_mgt_* - Note down the Client ID and Client Secret
2. Configure Test Environment
Edit .env.integration with your WSO2IS details:
3. Run Integration Tests
Integration tests cover:
- OAuth token acquisition and API access
- OIDC-compliant authentication verification
Note: Integration tests require a properly configured WSO2IS instance with appropriate OAuth scopes. Copy .env.integration.example to .env.integration and configure your WSO2IS instance details. All tests (authentication, user management, and group management) are enabled.
Tests automatically clean up created resources after each test.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email the repository maintainer instead of using the issue tracker.
Credits
- Don Mbelembe
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-wso2is with dependencies
illuminate/contracts Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
guzzlehttp/guzzle Version ^7.0