public void TestPositive() { bool verification = jwt.DoVerify(token, "HS256", claims, options); Assert.IsTrue(verification); True(verification, jwt); }
public void Test_expValidationPositive() { options.AddCustomTimeValidationClaim("exp", "2030/07/07 10:15:20", "20"); string token = jwt.DoCreate("HS256", claims, options); bool validation = jwt.DoVerify(token, "HS256", claims, options); Assert.IsTrue(validation); }
public void GenerateToken() { string hexaKey = keyGen.doGenerateKey("GENERICRANDOM", 256); options.SetSecret(hexaKey); token = jwt.DoCreate("HS256", claims, options); Assert.IsFalse(jwt.HasError()); bool verification = jwt.DoVerify(token, "HS256", claims, options); True(verification, jwt); }
public void TestVerificationWithoutPrivateKey() { bool validation = jwt.DoVerify(token, "RS256", claims, options2); //System.out.println("Error. Code: " + jwt.getErrorCode() + " Desc: " + jwt.getErrorDescription()); Assert.IsTrue(validation); }
public void TestPositive() { string payload = jwt.GetPayload(token); bool verification = jwt.DoVerify(token, "HS256", claimslevel1, options); True(verification, jwt); }
private void bulkTest_shouldWork(PrivateKeyManager key, CertificateX509 cert, string alg, string curve) { options.SetPrivateKey(key); options.SetCertificate(cert); string token = jwt.DoCreate(alg, claims, options); Assert.IsFalse(jwt.HasError()); bool verification = jwt.DoVerify(token, alg, claims, options); True(verification, jwt); }
public void TestPositive() { bool verification = jwt.DoVerify(token, "HS256", claimslevel1, options); True(verification, jwt); }