Example #1
0
 public TokenTest()
 {
     factory   = new JwtFactory(new Base64URL(), new TestJsonSerialization(), new HMACSHA256Signaturer(key));
     testToken = factory.GetJwtObject(testHeader, testPayload);
 }
Example #2
0
        public void TestTokenConstructByJwt()
        {
            var actualJwt = factory.GetJwtObject <Header, Payload>(testToken.Jwt);

            Assert.Equal(testToken, actualJwt, new TokenComparer <Token <Header, Payload> >());
        }
Example #3
0
 public string IssueToken(THeader h, TPayload p) => _jwtFactory
 .GetJwtObject(h, p)
 .Jwt;