private function decodeToken($jwt)
    {
        // Decode the token.
        $decodedToken = \JWT::decode($jwt, $this->secret, ['HS256']);

        // Validate that this JWT was made for us.
        $aud = property_exists($decodedToken, 'aud') ? $decodedToken->aud : null;
        if ($aud !== $this->localId) {
            throw new \UnexpectedValueException('This token is not intended for us.');
        }

        return $decodedToken;
    }