Nonce final class
Minn\Auth\Nonce · public/minn/src/Minn/Auth/Nonce.php · 46 lines
The wp_rest nonce: ten characters of HMAC-md5(tick|wp_rest|uid|token) under the nonce salt, accepted for the current tick and the one before.
Uses 2
Constants and properties
| private | LIFETIME = 86400 |
Public
| static | lifetime(string|int $action): int# | How long a nonce for an action lives, in seconds (nonce_life, handed the action as the caller gave it; probe filter-inputs-3). A plugin's filter reaches every nonce the engine makes and checks once plugins have loaded; a lifetime under a second keeps the default. |
| static | tick(string|int $action = -1): float# | The current half-life tick a nonce for an action is bound to. |
| static | create(int $userId, string $token, string|int $action = 'wp_rest'): string# | A wp_rest nonce for a user and session token at the current tick. |
| static | verify(string $nonce, int $userId, string $token, string $action = 'wp_rest'): bool# | Whether a nonce is valid at this tick or the one before. |
| static | at(float $tick, int $userId, string $token, string $action): string# | The nonce for a given tick. |
Nothing matches.