Neos\Flow\Security\Aspect\LoggingAspect::logPersistedUsernamePasswordProviderAuthenticate PHP Метод

logPersistedUsernamePasswordProviderAuthenticate() публичный Метод

Logs calls and results of the authenticate() method of an authentication provider
public logPersistedUsernamePasswordProviderAuthenticate ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed
$joinPoint Neos\Flow\Aop\JoinPointInterface The current joinpoint
Результат mixed The result of the target method if it has not been intercepted
    public function logPersistedUsernamePasswordProviderAuthenticate(JoinPointInterface $joinPoint)
    {
        $token = $joinPoint->getMethodArgument('authenticationToken');
        switch ($token->getAuthenticationStatus()) {
            case TokenInterface::AUTHENTICATION_SUCCESSFUL:
                $this->securityLogger->log(sprintf('Successfully authenticated token: %s', $token), LOG_NOTICE, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
                $this->alreadyLoggedAuthenticateCall = true;
                break;
            case TokenInterface::WRONG_CREDENTIALS:
                $this->securityLogger->log(sprintf('Wrong credentials given for token: %s', $token), LOG_WARNING, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
                break;
            case TokenInterface::NO_CREDENTIALS_GIVEN:
                $this->securityLogger->log(sprintf('No credentials given or no account found for token: %s', $token), LOG_WARNING, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
                break;
        }
    }