Skip to content

#278 - Generate the API token with random_bytes() - #279

Merged
njoubert-cleverage merged 3 commits into
mainfrom
278
Nov 4, 2026
Merged

njoubert-cleverage merged 3 commits into
mainfrom
278

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #278: UserCrudController::generateToken() generates the API token with bin2hex(random_bytes(16)) (32 hexadecimal characters, as before) instead of md5(uniqid(date('YmdHis'))). The existing tokens keep working (only their hash is stored).

This is the non-BC part of #116 (milestone v4.0), which will need a rebase on the same line.

Checked locally: highest dependencies (PHP 8.5), with pcov coverage: all tests OK, no risky; PHPStan, PHP-CS-Fixer and Rector OK.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage requested a review from a team as a code owner November 4, 2026 15:29
njoubert-cleverage and others added 2 commits November 4, 2026 17:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 8b7eece into main Nov 4, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API token generated from the date of the generation only

1 participant