the encoded token
a decoded Token
long now = Clock.currTime.toUnixTime(); Token token = new Token(JWTAlgorithm.NONE); token.claims.nbf = now + (60 * 60); string encodedToken = token.encode(); assertThrown!NotBeforeException(verify(encodedToken)); token = new Token(JWTAlgorithm.NONE); token.claims.iat = now - 3600; token.claims.exp = now - 60; encodedToken = token.encode(); assertThrown!ExpiredException(token = verify(encodedToken));
verifies the tokens is valid, used in case the token was signed with "none" as algorithm