Skip to content
Open
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
6 changes: 5 additions & 1 deletion src/Authentication/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Authentication\AuthenticationService as BaseService;
use Authentication\Authenticator\ResultInterface;
use Authentication\Authenticator\StatelessInterface;
use Cake\Datasource\EntityInterface;
use Psr\Http\Message\ServerRequestInterface;
use RuntimeException;

Expand Down Expand Up @@ -74,8 +75,11 @@
foreach ($this->authenticators() as $authenticator) {
$result = $authenticator->authenticate($request);
if ($result->isValid()) {
$skipTwoFactorVerify = $authenticator->getConfig('skipTwoFactorVerify');

Check failure on line 78 in src/Authentication/AuthenticationService.php

View workflow job for this annotation

GitHub Actions / Coding Standard & Static Analysis

Call to an undefined method Authentication\Authenticator\AuthenticatorInterface::getConfig().

Check failure on line 78 in src/Authentication/AuthenticationService.php

View workflow job for this annotation

GitHub Actions / Coding Standard & Static Analysis

Call to an undefined method Authentication\Authenticator\AuthenticatorInterface::getConfig().
$userData = $result->getData()->toArray();
$userData = $result->getData();
if ($userData instanceof EntityInterface) {
$userData = $userData->toArray();
}
foreach ($processors as $processor) {
if ($skipTwoFactorVerify !== true && $processor->isRequired($userData)) {
return $this->proceed2FA($processor, $request, $result);
Expand Down
Loading