public void TestMalformedHeader() { string res = jwt.GetHeader(token); Assert.IsTrue(SecurityUtils.compareStrings(res, "")); Assert.IsTrue(jwt.HasError()); }
public void TestGetHeader() { string header = "{\"typ\":\"JWT\",\"alg\":\"HS256\"}"; string header1 = "{\"alg\":\"HS256\",\"typ\":\"JWT\"}"; string tHeader = jwt.GetHeader(token); Assert.IsTrue(SecurityUtils.compareStrings(header, tHeader) || SecurityUtils.compareStrings(header1, tHeader)); }
public void Test_algorithm() { string header = jwt.GetHeader(token); Assert.IsTrue(SecurityUtils.compareStrings(header, expected)); }