From f68336b96e0d843511bb1bd3fdac8bba2fe4573a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 23 Mar 2023 13:36:52 +0100 Subject: teal: Move into prosody namespace --- teal-src/util/jwt.d.tl | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 teal-src/util/jwt.d.tl (limited to 'teal-src/util/jwt.d.tl') diff --git a/teal-src/util/jwt.d.tl b/teal-src/util/jwt.d.tl deleted file mode 100644 index 929d7419..00000000 --- a/teal-src/util/jwt.d.tl +++ /dev/null @@ -1,38 +0,0 @@ -local crypto = require "util.crypto" -local record jwtlib - enum algorithm - "HS256" - "HS384" - "HS512" - "ES256" - "ES512" - "RS256" - "RS384" - "RS512" - "PS256" - "PS384" - "PS512" - end - type payload = { string : any } - type signer_t = function (payload : payload) : string - type verifier_t = function (token : string) : payload - enum key_type - "rsaEncryption" - "id-ecPublicKey" - end - record algorithm_t - sign : signer_t - verify : verifier_t - load_key : function (key : string) : crypto.key - end - init : function (algorithm, private_key : string, public_key : string, table) : signer_t, verifier_t - new_signer : function (algorithm, string, table) : signer_t - new_verifier : function (algorithm, string, table) : verifier_t - _algorithms : { - algorithm : algorithm_t - } - -- Deprecated - sign : function (private_key : string, payload) : string - verify : function (string) : payload -end -return jwtlib -- cgit v1.2.3