Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
}
],
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"psr/http-message": "^1.0.1",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"psr/http-message": "^1.0 || 2.0",
"laminas/laminas-servicemanager": "^3.11.2",
"laminas/laminas-hydrator": "^4.3.1",
"dotkernel/dot-authentication": "^2.1",
"laminas/laminas-dependency-plugin": "^2.2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.20",
"squizlabs/php_codesniffer": "^3.6.2",
"laminas/laminas-authentication": "2.15.0",
"laminas/laminas-db": "^2.15.0",
"laminas/laminas-session": "^2.12.1",
"laminas/laminas-psr7bridge": "^1.6.0"
},
"require-dev": {
"phpunit/phpunit": "^10.3.2",
"squizlabs/php_codesniffer": "^3.7.2"
},
"suggest": {
"laminas/laminas-db": "Needed if you are using the CallbackCheckAdapter",
"laminas/laminas-session": "Used by the SessionStorage to store authentication identity",
Expand Down
16 changes: 8 additions & 8 deletions src/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Dot\Authentication\Adapter\AdapterInterface;
use Dot\Authentication\Identity\IdentityInterface;
use Dot\Authentication\Storage\StorageInterface;
use Laminas\Authentication\Exception\ExceptionInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

Expand Down Expand Up @@ -113,25 +114,24 @@ public function hasIdentity(): bool
return !$this->storage->isEmpty();
}


/**
* @return void
* @throws ExceptionInterface
*/
public function clearIdentity()
public function clearIdentity(): void
{
$this->storage->clear();
}


/**
* @param IdentityInterface $identity
* @throws ExceptionInterface
*/
public function setIdentity(IdentityInterface $identity)
public function setIdentity(IdentityInterface $identity): void
{
$this->storage->write($identity);
$this->storage->write($identity);
}

/**
* @return IdentityInterface
*/
public function getIdentity(): ?IdentityInterface
{
return $this->storage->read();
Expand Down