PHP code example of sunxyw / spiral-auth0-bridge
1. Go to this page and download the library: Download sunxyw/spiral-auth0-bridge 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/ */
sunxyw / spiral-auth0-bridge example snippets
protected const LOAD = [
// ...
\Sunxyw\SpiralAuth0Bridge\Bootloader\Auth0BridgeBootloader::class,
];
public function index(\Spiral\Auth\AuthContextInterface $auth)
{
if ($auth->getActor() === null) {
throw new ForbiddenException();
}
dump($auth->getActor());
}