Example #1
0
 private static string Decode(string token, object key = null, JwsAlgorithm?jwsAlg = null, JweAlgorithm?jweAlg = null, JweEncryption?jweEnc = null)
 {
     byte[] numArray = JWT.DecodeBytes(token, key, jwsAlg, jweAlg, jweEnc);
     return(Encoding.UTF8.GetString(numArray));
 }
Example #2
0
 public static T Decode <T>(string token, object key = null)
 {
     return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key)));
 }
Example #3
0
 public static T Decode <T>(string token, object key, JwsAlgorithm alg)
 {
     return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key, alg)));
 }
Example #4
0
 public static T Decode <T>(string token, object key, JweAlgorithm alg, JweEncryption enc)
 {
     return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key, alg, enc)));
 }
Example #5
0
 public static string Decode(string token, object key = null)
 {
     return(JWT.Decode(token, key, null, null, null));
 }
Example #6
0
        public static string Decode(string token, object key, JweAlgorithm alg, JweEncryption enc)
        {
            JwsAlgorithm?nullable = null;

            return(JWT.Decode(token, key, nullable, new JweAlgorithm?(alg), new JweEncryption?(enc)));
        }