Download the PHP package equidna/domain-token-auth without Composer
On this page you can find all versions of the php package equidna/domain-token-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download equidna/domain-token-auth
More information about equidna/domain-token-auth
Files in equidna/domain-token-auth
Package domain-token-auth
Short Description Secure domain-based token authentication package for Laravel
License MIT
Informations about the package domain-token-auth
README
This documentation follows the coding conventions reflected throughout the codebase.
Project Overview
equidna/domain-token-auth is a Laravel package that provides secure, domain-scoped opaque token authentication. It issues cryptographically random tokens tied to a functional domain, a polymorphic owner model, a set of roles and fine-grained actions, optional custom data payload, and an optional validity window. Tokens are stored only as SHA-256 hashes; the plain-text value is shown exactly once at issuance time.
Who it is for:
- Laravel application developers who need API token authentication without depending on Laravel Sanctum or Passport.
- Multi-tenant SaaS platforms that must ensure a token issued for one tenant cannot be used in another tenant's context (via optional
equidna/bee-hiveintegration). - Integrators building machine-to-machine token pipelines with per-domain authorization rules.
Main use cases:
- Issuing short-lived or long-lived tokens for human users, application clients, services, or partner integrations, each in its own named domain.
- Protecting routes with per-domain middleware (
domain-token:{domain}). - Enforcing fine-grained action authorization with wildcard support (
users.*,*). - Attaching and consuming domain-specific metadata through token
dataafter authentication. - Revoking tokens immediately without modifying the consuming request flow.
Project Type & Tech Summary
| Property | Value |
|---|---|
| Project type | Laravel package (library) |
| Package name | equidna/domain-token-auth |
| PHP version | ^8.2 |
| Laravel version | ^12.0\|^13.0 (via illuminate/* components) |
| Symfony version | HttpFoundation ^7.2\|^8.0 |
| Primary database | Relies on the host application's configured database |
| Cache | Not used internally |
| Queue | Not used internally |
| Key external service | equidna/bee-hive (optional) - multi-tenant context propagation |
Quick Start
Laravel 12 runs on PHP 8.2+ with Symfony 7. Laravel 13 requires PHP 8.3+ and supports Symfony 7.4 or 8; Symfony 8 itself requires PHP 8.4+.
-
Install via Composer:
-
Publish the configuration file:
-
Publish and run migrations:
-
Implement
TokenOwneron your owner model and add theHasDomainTokenstrait: -
Configure your domains in
config/domain-token-auth.php. -
Protect routes with the
domain-tokenmiddleware: -
Issue tokens via the facade or Artisan command:
- Consume authenticated token data in protected routes:
For full details, see Deployment Instructions.
Documentation Index
- Deployment Instructions
- API Documentation
- Routes Documentation
- Artisan Commands
- Tests Documentation
- Architecture Diagrams
- Monitoring
- Business Logic & Core Processes
- Open Questions & Assumptions
License
MIT - see LICENSE.
All versions of domain-token-auth with dependencies
illuminate/support Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
symfony/http-foundation Version ^7.2|^8.0