marko / authentication-token
Personal access token authentication for Marko Framework
Package info
github.com/marko-php/marko-authentication-token
pkg:composer/marko/authentication-token
0.11.0
2026-10-06 14:28 UTC
Requires
- php: ^8.5
- marko/authentication: 0.11.0
- marko/clock: 0.11.0
- marko/config: 0.11.0
- marko/core: 0.11.0
- marko/database: 0.11.0
- marko/routing: 0.11.0
Requires (Dev)
- marko/authorization: 0.11.0
- marko/testing: 0.11.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Stateless API token authentication --- issue personal access tokens with scoped abilities for mobile apps, SPAs, and third-party integrations.
Installation
composer require marko/authentication-token
Quick Example
use Marko\AuthenticationToken\Service\TokenManager; $newToken = $tokenManager->createToken( user: $user, name: 'mobile-app', abilities: ['posts:read', 'posts:write'], ); // expires after token_expiration_days (365 by default) // Plain-text token is ONLY available at creation time $newToken->plainTextToken;
Documentation
Full usage, API reference, and examples: marko/authentication-token