for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByJG\Util;
class JwtKeySecret implements JwtKeyInterface
{
protected $key;
/**
* JwtKeySecret constructor.
* @param $key
* @param bool $decode
*/
public function __construct($key, $decode = true)
$this->key = ($decode ? base64_decode($key) : $key);
}
* @return JwtKeySecret
public static function getInstance($key, $decode = true)
return new JwtKeySecret($key, $decode);
public function getPublicKey()
return $this->key;
public function getPrivateKey()
public function getAlghoritm()
return 'HS512';