Example #1
0
        public void UserIdValidator_ElseAccept()
        {
            var payload = new JObject();

            payload["userId"] = "it's me a mario";

            var result = new JwtHasUserIdValidator().Validate(new JwtPayload(payload));

            Assert.IsTrue(result);
        }
Example #2
0
        public void UserIdValidator_RejectDifferingUserIdType()
        {
            var payload = new JObject();

            payload["userId"] = 4692483;

            var result = new JwtHasUserIdValidator().Validate(new JwtPayload(payload));

            Assert.IsFalse(result);
        }