wilkques / pkce-php
PKCE for PHP
v3.0.0
2025-03-25 06:43 UTC
Requires
- php: ^8.2
- wilkques/php-helper: ^5.0.0
This package is auto-updated.
Last update: 2025-03-25 06:58:07 UTC
README
composer require wilkques/pkce-php
How to use
use Wilkques\PKCE\Generator; $codeVerifier = Generator::codeVerifier(); $codeChallenge = Generator::codeChallenge($codeVerifier); // or $pkce = Generator::generate(); $codeVerifier = $pkce->getCodeVerifier(); $codeChallenge = $pkce->getCodeChallenge(); // or $codeVerifier = $pkce->codeVerifier; $codeChallenge = $pkce->codeChallenge; // or $pkce->toArray(); // output ['codeVerifier' => '123', 'codeChallenge' => '456'] $pkce->toJson(); // output {'codeVerifier' : '123', 'codeChallenge' : '456'}