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)); }
public static T Decode <T>(string token, object key = null) { return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key))); }
public static T Decode <T>(string token, object key, JwsAlgorithm alg) { return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key, alg))); }
public static T Decode <T>(string token, object key, JweAlgorithm alg, JweEncryption enc) { return(JWT.jsMapper.Parse <T>(JWT.Decode(token, key, alg, enc))); }
public static string Decode(string token, object key = null) { return(JWT.Decode(token, key, null, null, null)); }
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))); }