aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-10 13:58:43 +0100
committerKim Alvefur <zash@zash.se>2023-03-10 13:58:43 +0100
commitb64d6afeab56c1d41aabdec72f570cf829a5181b (patch)
tree1323af9a6ec9c6a411f0cf65ddb763bb8ab5a858 /teal-src
parent7623bc24de3d0196a3dd5297320618880dddba81 (diff)
downloadprosody-b64d6afeab56c1d41aabdec72f570cf829a5181b.tar.gz
prosody-b64d6afeab56c1d41aabdec72f570cf829a5181b.zip
util.jwt: Import definition of key from util.crypto
Turns out we had a definition of that already
Diffstat (limited to 'teal-src')
-rw-r--r--teal-src/util/jwt.d.tl6
1 files changed, 2 insertions, 4 deletions
diff --git a/teal-src/util/jwt.d.tl b/teal-src/util/jwt.d.tl
index ec501bfa..929d7419 100644
--- a/teal-src/util/jwt.d.tl
+++ b/teal-src/util/jwt.d.tl
@@ -1,3 +1,4 @@
+local crypto = require "util.crypto"
local record jwtlib
enum algorithm
"HS256"
@@ -19,13 +20,10 @@ local record jwtlib
"rsaEncryption"
"id-ecPublicKey"
end
- record key_t
- get_type : function (key_t) : key_type
- end
record algorithm_t
sign : signer_t
verify : verifier_t
- load_key : function (key : string) : key_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