wilkques / pkce-php
PKCE for PHP
v2.0.0
2022-05-18 02:56 UTC
Requires
- php: ^7.0|^8.0
This package is auto-updated.
Last update: 2024-11-22 11:33:32 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'}