Download the PHP package azaharizaman/nexus-identity without Composer

On this page you can find all versions of the php package azaharizaman/nexus-identity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nexus-identity

Nexus\Identity

Framework-agnostic Identity and Access Management package for Nexus ERP

The Identity package provides a comprehensive, pure PHP solution for authentication, authorization, session management, and user identity management. It follows strict contract-driven design principles and integrates seamlessly with the Nexus monorepo architecture.

Features

Installation

Architecture

CQRS Pattern (v1.1.0+)

The package follows CQRS (Command Query Responsibility Segregation) pattern. Each repository domain has separate interfaces:

Domain Query Interface (Read) Persist Interface (Write)
User UserQueryInterface UserPersistInterface
Role RoleQueryInterface RolePersistInterface
Permission PermissionQueryInterface PermissionPersistInterface
MFA Enrollment MfaEnrollmentQueryInterface MfaEnrollmentPersistInterface
Trusted Device TrustedDeviceQueryInterface TrustedDevicePersistInterface
WebAuthn Credential WebAuthnCredentialQueryInterface WebAuthnCredentialPersistInterface
Backup Code BackupCodeQueryInterface BackupCodePersistInterface

Best Practice: Inject the specific Query or Persist interface based on your needs:

Package Structure

Core Principles

  1. Logic in Packages, Implementation in Applications

    • Package defines what (interfaces, services, value objects)
    • Application defines how (Eloquent models, repositories, migrations)
  2. Framework Agnostic

    • Zero Laravel dependencies in src/
    • No Illuminate\* classes
    • No Eloquent models
    • No database queries
  3. Dependency Injection

    • Constructor injection for all dependencies
    • Interface-based dependencies only
  4. CQRS Separation
    • Query interfaces for read operations
    • Persist interfaces for write operations
    • Clear command/query responsibility

Usage Examples

User Management

Authentication

Authorization

Basic Permission Checking (RBAC)

Policy-Based Authorization (ABAC)

For complex authorization that requires context, relationships, or business rules:

When to use Policy-Based Authorization:

When to use Basic Permission Checking:

Role Management

Permission Management

API Token Management

Value Objects

Value objects are immutable and enforce business rules:

UserStatus

Credentials

Permission

Exception Handling

All domain exceptions extend PHP's base Exception:

Integration with Application Layer

The application layer (apps/Atomy) must provide implementations for all contracts:

  1. Eloquent Models implementing entity interfaces
  2. Repositories implementing repository interfaces
  3. Service Implementations (password hashing, validation, etc.)
  4. Database Migrations
  5. Service Provider Bindings

Example binding in AppServiceProvider:

Security Considerations

  1. Password Hashing: Use Argon2id or bcrypt (minimum cost 12)
  2. Session Tokens: Cryptographically secure random tokens (256 bits minimum)
  3. API Tokens: One-way hashed in database, only shown once on generation
  4. Failed Login Tracking: Lock account after configurable threshold (default 5)
  5. Password History: Prevent reuse of last N passwords (default 5)
  6. Session Fingerprinting: Bind sessions to IP/User-Agent
  7. MFA Enforcement: Can be required per role
  8. Audit Logging: All authentication/authorization events logged

Requirements Addressed

This package addresses all requirements listed in REQUIREMENTS.csv for Nexus\Identity:

Testing

Package tests should use mocks for all repository implementations:

📖 Documentation

Package Documentation

Additional Resources

License

MIT License. See LICENSE file for details.


All versions of nexus-identity with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/log Version ^3.0
spomky-labs/otphp Version ^11.3
endroid/qr-code Version ^5.0
web-auth/webauthn-lib Version ^4.7
web-auth/cose-lib Version ^4.2
azaharizaman/nexus-common Version dev-main
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package azaharizaman/nexus-identity contains the following files

Loading the files please wait ...