public function getAuthenticateFromChallenge(ChallengeMessage $msg)
    {
        $token = [
            'id' => $this->authid,
            'exp' => time() + 60,
        ];
        $token = JWT::encode($token, Security::salt());
        return new AuthenticateMessage($token);
    }