public void TestBuild()
        {
            var hasher  = new TestHasher();
            var builder = new TokenBuilder(hasher.HashName)
                          .AddClaim("Hello", "World");

            var(success, _, token, error) = builder.BuildAsync(hasher).Result;
            Assert.True(success, error);

            _testOutputHelper.WriteLine(Encoding.UTF8.GetString(token));

            (success, _, error) = new Token(token).VerifyAsync(hasher).Result;
            Assert.True(success, error);
        }
Beispiel #2
0
 public TokenTest()
 {
     _testHasher = new TestHasher();
 }