method set documentation in bbn\Util\Jwt
function(array $data)
{
$this->payload['data'] = $data;
try {
if ($this->key) {
$jwt = \Firebase\JWT\JWT::encode($this->payload, $this->key, 'RS512');
}
else {
$jwt = \Firebase\JWT\JWT::encode($this->payload, $this->payload['sub'], 'HS256');
}
}
catch (\Firebase\JWT\ExpiredException $e) {
X::hdump($e->getMessage());
throw new \Exception($e);
}
catch (\Exception $e) {
X::hdump($e->getMessage());
throw new \Exception($e);
}
return $jwt;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions