Select Git revision
-
Reiter, Christoph authored
We want this bundle to work with all kind of OIDC servers in the future. Fixes #2
Reiter, Christoph authoredWe want this bundle to work with all kind of OIDC servers in the future. Fixes #2
DummyUserSession.php 898 B
<?php
declare(strict_types=1);
namespace Dbp\Relay\AuthBundle\Tests;
use Dbp\Relay\CoreBundle\API\UserSessionInterface;
class DummyUserSession implements UserSessionInterface
{
private $jwt;
private $id;
private $roles;
public function __construct(?string $id = 'id', array $roles = [])
{
$this->id = $id;
$this->roles = $roles;
}
public function setSessionToken(?array $jwt): void
{
$this->jwt = $jwt;
}
public function getUserIdentifier(): ?string
{
return $this->id;
}
public function getUserRoles(): array
{
return $this->roles;
}
public function getSessionLoggingId(): ?string
{
return 'logging-id';
}
public function getSessionCacheKey(): ?string
{
return 'cache';
}
public function getSessionTTL(): int
{
return 42;
}
}