Nette\Security\SimpleAuthenticator::authenticate PHP Метод

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

and returns IIdentity on success or throws AuthenticationException
public authenticate ( array $credentials ) : Nette\Security\IIdentity
$credentials array
Результат Nette\Security\IIdentity
    public function authenticate(array $credentials)
    {
        list($username, $password) = $credentials;
        foreach ($this->userlist as $name => $pass) {
            if (strcasecmp($name, $username) === 0) {
                if ((string) $pass === (string) $password) {
                    return new Identity($name, isset($this->usersRoles[$name]) ? $this->usersRoles[$name] : NULL);
                } else {
                    throw new AuthenticationException('Invalid password.', self::INVALID_CREDENTIAL);
                }
            }
        }
        throw new AuthenticationException("User '{$username}' not found.", self::IDENTITY_NOT_FOUND);
    }
SimpleAuthenticator