PHP code example of pushinbr / pam-native-auth
1. Go to this page and download the library: Download pushinbr/pam-native-auth library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pushinbr / pam-native-auth example snippets
use Pam\Native\Auth\AuthVault;
use Pam\Native\Auth\Pkce;
$pkce = Pkce::generate(); // Send $pkce->challenge to your OAuth 2.1 authorization server.
(new AuthVault())->store('session.refresh-token', $refreshToken, function ($state, $error): void {
// AuthOperationState is an integer-backed enum.
});