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
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@
"cs-check": "phpcs --colors -p src/ tests/",
"cs-fix": "phpcbf --colors -p src/ tests/",
"phpstan": "tools/phpstan analyse",
"psalm": "tools/psalm --show-info=false",
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
"stan": [
"@phpstan",
"@psalm"
],
"stan": "@phpstan",
"stan-baseline": "tools/phpstan --generate-baseline",
"stan-setup": "phive install",
"test": "phpunit",
Expand Down
2 changes: 0 additions & 2 deletions psalm-baseline.xml

This file was deleted.

32 changes: 0 additions & 32 deletions psalm.xml

This file was deleted.

26 changes: 1 addition & 25 deletions src/Authenticator/CookieAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

use ArrayAccess;
use Authentication\Identifier\AbstractIdentifier;
use Authentication\Identifier\IdentifierCollection;
use Authentication\PasswordHasher\PasswordHasherTrait;
use Authentication\UrlChecker\UrlCheckerTrait;
use Cake\Http\Cookie\Cookie;
Expand All @@ -27,12 +26,11 @@
use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use RuntimeException;

/**
* Cookie Authenticator
*
* Authenticates an identity based on a cookies data.
* Authenticates an identity based on a cookie data.
*/
class CookieAuthenticator extends AbstractAuthenticator implements PersistenceInterface
{
Expand All @@ -57,28 +55,6 @@ class CookieAuthenticator extends AbstractAuthenticator implements PersistenceIn
'salt' => true,
];

/**
* @inheritDoc
*/
public function __construct(IdentifierCollection $identifiers, array $config = [])
{
$this->_checkCakeVersion();

parent::__construct($identifiers, $config);
}

/**
* Checks the CakePHP Version by looking for the cookie implementation
*
* @return void
*/
protected function _checkCakeVersion(): void
{
if (!class_exists(Cookie::class)) {
throw new RuntimeException('Install CakePHP version >=3.5.0 to use the `CookieAuthenticator`.');
}
}

/**
* @inheritDoc
*/
Expand Down
Loading