Download the PHP package azaharizaman/nexus-sso without Composer
On this page you can find all versions of the php package azaharizaman/nexus-sso. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-sso
More information about azaharizaman/nexus-sso
Files in azaharizaman/nexus-sso
Package nexus-sso
Short Description ⚠️ PENDING: Framework-agnostic Single Sign-On package for Nexus ERP
License MIT
Informations about the package nexus-sso
Nexus\SSO - Single Sign-On Package
⚠️ PACKAGE PENDING - Phase 4 Incomplete (See PENDING_WORK.md)
Framework-agnostic Single Sign-On (SSO) package for Nexus ERP monorepo. Supports SAML 2.0, OAuth2/OIDC, Azure AD, Google Workspace, and custom identity providers.
🎯 Features
- Multi-Protocol Support: SAML 2.0, OAuth2, OpenID Connect (OIDC)
- Vendor Integrations: Azure AD (Entra ID), Google Workspace, Okta (planned)
- Just-In-Time Provisioning: Auto-create users from SSO profiles
- Attribute Mapping: Flexible mapping from IdP attributes to local user fields
- Multi-Tenant Ready: Per-tenant SSO configuration
- CSRF Protection: Secure state validation for callbacks
- Framework Agnostic: Pure PHP 8.3+ with minimal dependencies
📦 Installation & Dependencies
Runtime Dependencies
- onelogin/php-saml
^4.3- SAML 2.0 protocol implementation - league/oauth2-client
^2.8- OAuth2/OIDC client library - psr/log
^3.0- Logging interface (framework-agnostic)
🏗️ Architecture
The Nexus\SSO package is designed to be completely decoupled from Nexus\Identity. It defines contracts (interfaces) that your application implements using the Identity package.
The Separation Principle
| Package | Responsibility | Analogy |
|---|---|---|
Nexus\SSO |
Authentication Orchestration | "The bouncer" - verifies credentials with external IdP |
Nexus\Identity |
User Management | "The membership database" - stores users, roles, permissions |
🚀 Quick Start
1. Install Package Dependencies
2. Define Core Interfaces (Phase 1 - Completed)
The package provides these core contracts:
SsoManagerInterface- Main SSO orchestrationSsoProviderInterface- Base provider contractSamlProviderInterface- SAML 2.0 specific operationsOAuthProviderInterface- OAuth2/OIDC specific operationsUserProvisioningInterface- Bridge to Identity (you implement this)AttributeMapperInterface- Attribute mapping serviceSsoConfigRepositoryInterface- Configuration storageCallbackStateValidatorInterface- CSRF protectionStateStorageInterface- Temporary state storageSsoSessionRepositoryInterface- Session management
3. Available Providers (Phases 2-3 - Completed)
SAML 2.0 Provider (Saml2Provider):
- Full SAML 2.0 authentication flow
- SP metadata XML generation
- SAML assertion parsing and validation
- Single Logout (SLO) support
- Signature validation (configurable)
OAuth 2.0 Provider (OAuth2Provider):
- Generic OAuth 2.0 flow
- Authorization code exchange
- Userinfo endpoint integration
- Token refresh support
- Flexible attribute mapping
4. Implement User Provisioning (Your Application)
In your consuming application, implement the UserProvisioningInterface:
4. Configure SSO Provider
📚 Usage Examples
Initiate SSO Login
Handle SSO Callback
🧪 Testing
Run tests:
Run tests with coverage:
Current test coverage: 81 tests, 202 assertions, 100% passing
🏗️ Package Structure
📋 Implementation Status
✅ Phase 1: Core Infrastructure (COMPLETED)
- [x] Package structure
- [x] Core contracts (8 interfaces)
- [x] Value objects (6 classes)
- [x] Exceptions (10 classes)
- [x] AttributeMapper service
- [x] CallbackStateValidator service
- [x] Unit tests (81 tests passing)
✅ Phase 2: SAML 2.0 Provider (COMPLETED)
- [x] Saml2Provider implementation
- [x] SAML signature validation
- [x] SP metadata generation
- [x] SAML-specific tests
✅ Phase 3: OAuth2/OIDC Provider (COMPLETED)
- [x] OAuth2Provider implementation
- [x] OidcProvider implementation
- [x] JWT ID token validation
- [x] OAuth-specific tests
⏳ Phase 4: Vendor-Specific Providers (PLANNED)
- [ ] AzureAdProvider (Azure AD/Entra ID)
- [ ] GoogleWorkspaceProvider
- [ ] OktaProvider
🔗 Integration with Other Packages
- Nexus\Identity: User management, roles, permissions (via
UserProvisioningInterface) - Nexus\Tenant: Multi-tenancy support (SSO configs scoped by tenant)
- Nexus\AuditLogger: Audit trail for SSO events
- Nexus\Telemetry: Telemetry for SSO metrics
📖 Documentation
- Implementation Plan
- Requirements
- Executive Summary
- Architecture Diagrams
📖 Documentation
Package Documentation
- Getting Started Guide - Quick start guide with prerequisites, concepts, and first integration
- API Reference - Complete documentation of all interfaces, value objects, and exceptions
- Integration Guide - Laravel and Symfony integration examples
- Basic Usage Example - Simple usage patterns
- Advanced Usage Example - Advanced scenarios and patterns
Additional Resources
IMPLEMENTATION_SUMMARY.md- Implementation progress and metricsREQUIREMENTS.md- Detailed requirementsTEST_SUITE_SUMMARY.md- Test coverage and resultsVALUATION_MATRIX.md- Package valuation metrics- See root
ARCHITECTURE.mdfor overall system architecture
🤝 Contributing
This package follows strict architectural guidelines:
- Framework Agnostic: No Laravel dependencies in package layer
- Contract-Driven: Define interfaces first, implement later
- Immutability: Use
readonlyproperties for all value objects - PHP 8.3+: Native enums, constructor property promotion, strict types
- TDD: Red-Green-Refactor methodology
📄 License
MIT License. See LICENSE for details.
Package Version: 0.1.0 (Development)
PHP Version: 8.3+
Status: 🟡 In Development (Phase 1 Complete)
All versions of nexus-sso with dependencies
psr/log Version ^3.0
onelogin/php-saml Version ^4.3
league/oauth2-client Version ^2.8
lcobucci/jwt Version ^5.6