Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

marko/authentication-token

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'],
);

// Plain-text token is ONLY available at creation time
$newToken->plainTextToken;

Documentation

Full usage, API reference, and examples: marko/authentication-token