finished login stg 1

This commit is contained in:
2018-05-10 09:27:21 -04:00
parent ca630dda67
commit 4bc9c83e38
14 changed files with 2900 additions and 84 deletions

View File

@@ -0,0 +1,21 @@
<?php
require '../vendor/autoload.php';
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Hmac\Sha256;
$signer = new Sha256();
$token = (new Builder())->setIssuer("http://pugludos.com")
->setIssuedAt(time())
->setExpiration(time() + 3600)
->set("userName", "ckoch")
->sign($signer, "testing")
->getToken();
echo( $token );
/* used to verify token */
var_dump($token->verify($signer, 'testing'));
?>