hercdottech/stateless-token

A composer package to generate and validate stateless tokens

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/hercdottech/stateless-token

v1.0.0 2025-06-06 15:29 UTC

This package is auto-updated.

Last update: 2025-12-06 16:39:09 UTC


README

Build Status License: GNU GPL v3 Packagist Version

The hercdottech/stateless-token PHP package provides a way to generate and validate stateless tokens. Without making use of a database, files, or any other kind of state, this package relies on a private key known only to the server and an array of clues to validate the tokens.

Due to the stateless nature of this package, it cannot be used to protect against replay attacks.

Requirements

  • PHP 8.3 or later
  • PHP JSON Extension (installed by default)
  • PHP Hash Extension (installed by default)

Features

  • Generate secure tokens using sha256 algorithm HMAC hash.
  • The expiration period of each token is configurable, set to 1 hour by default.
  • The generated tokens are URL-safe and can be used with GET requests.

Installation

Run the following command in your terminal:

composer require hercdottech/stateless-token