Search by

marko / authentication-token

markshust

Personal access token authentication for Marko Framework

Package info

github.com/marko-php/marko-authentication-token

pkg:composer/marko/authentication-token

Statistics

Installs: 68

Dependents: 1

Suggesters: 1

Stars: 0

0.11.0 2026-10-06 14:28 UTC

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