23,7 → 23,7 |
\defined('INSIDE_OIDPLUS') or die; |
// phpcs:enable PSR1.Files.SideEffects |
|
class OIDplusAuthContentStoreJWT extends OIDplusAuthContentStoreDummy { |
class OIDplusAuthContentStoreJWT extends OIDplusAuthContentStore { |
|
/** |
* Cookie name for the JWT auth token |
215,8 → 215,47 |
// Override abstract functions |
|
/** |
* @var array |
*/ |
protected $content = array(); |
|
/** |
* @param string $name |
* @param mixed|null $default |
* @return mixed|null |
*/ |
public function getValue(string $name, $default = NULL) { |
return $this->content[$name] ?? $default; |
} |
|
/** |
* @param string $name |
* @param mixed $value |
* @return void |
*/ |
public function setValue(string $name, $value) { |
$this->content[$name] = $value; |
} |
|
/** |
* @param string $name |
* @return bool |
*/ |
public function exists(string $name): bool { |
return isset($this->content[$name]); |
} |
|
/** |
* @param string $name |
* @return void |
*/ |
public function delete(string $name) { |
unset($this->content[$name]); |
} |
|
/** |
* @return void |
*/ |
public function activate() { |
// Send cookie at the end of the HTTP request, in case there are multiple activate() calls |
OIDplus::register_shutdown_function(array($this,'activateNow')); |