Esempio n. 1
0
        public void TryDecode_String_Return_Result_Should_Be_True()
        {
            var token = _jwtEncoder.Encode(new Payload()
            {
                exp = UtilityHelper.GetTimeStamp() + 60
            }, secret);

            _jwtDecoder.TryDecode(token, secret, out string result).ShouldBe(true);
        }
Esempio n. 2
0
 public bool VerifyToken(IJwtDecoder jwtDecoder, string token, JwtOptions options)
 {
     return(jwtDecoder.TryDecode(token, options.SecretBytes, out string result));
 }