public void BasicAuthorisationTest()
        {
            string authorisationToken = AuthenticationUtils.GenerateBasicAuthorisationToken("new", "guest");

            Console.WriteLine("Authorisation token is " + authorisationToken + ".");
            AuthenticationUtils.GetSharedSecret sharedSecret = SharedSecret;
            string sessionToken;
            bool   authorised = AuthenticationUtils.VerifyBasicAuthorisationToken(authorisationToken, sharedSecret, out sessionToken);

            Assert.AreEqual(sessionToken, "new");
            Assert.IsTrue(authorised);
        }
        public void HMACSHA256AuthorisationTest()
        {
            string dateString;
            string authorisationToken = AuthenticationUtils.GenerateHMACSHA256AuthorisationToken("new", "guest", out dateString);

            Console.WriteLine("Authorisation token is " + authorisationToken + ".");
            Console.WriteLine("Generated UTC ISO 8601 date is " + dateString + ".");
            AuthenticationUtils.GetSharedSecret sharedSecret = SharedSecret;
            string sessionToken;
            bool   authorised = AuthenticationUtils.VerifyHMACSHA256AuthorisationToken(authorisationToken, dateString, sharedSecret, out sessionToken);

            Assert.AreEqual(sessionToken, "new");
            Assert.IsTrue(authorised);
        }