src/Authorizer/LocalAuthorizer.php
public function verifyCredentials(array $credentials)
    {
        $this->verifyRequiredFields($credentials, ['username', 'password']);

        switch ($this->username_format) {
            case AuthorizerInterface::USERNAME_FORMAT_ALPHANUM:
                $this->verifyAlphanumFields($credentials, ['username']);
                break;
            case AuthorizerInterface::USERNAME_FORMAT_EMAIL:
                $this->verifyEmailFields($credentials, ['username']);
                break;
        }

        $user = $this->user_repository->findByUsername($credentials['username']);

        $this->verifyUser($user, $credentials['password']);

        return $user;
    }
public function verifyCredentials(array $credentials)
    {
        $this->verifyRequiredFields($credentials, ['username', 'password']);

        switch ($this->username_format) {
            case AuthorizerInterface::USERNAME_FORMAT_ALPHANUM:
                $this->verifyAlphanumFields($credentials, ['username']);
                break;
            case AuthorizerInterface::USERNAME_FORMAT_EMAIL:
                $this->verifyEmailFields($credentials, ['username']);
                break;
        }

        $user = $this->user_repository->findByUsername($credentials['username']);

        $this->verifyUser($user, $credentials['password']);

        return $user;
    }
Credentials should be in array format with keys: token and username.
Example: ['username' => 'john.doe.123@gmail.com', 'password' => '123abc'].

{@inheritdoc}