Changeset

12929:245ffbb06f55

util.jwt: Import definition of key from util.crypto Turns out we had a definition of that already
author Kim Alvefur <zash@zash.se>
date Fri, 10 Mar 2023 13:58:43 +0100
parents 12928:916af6fcef1e
children 12930:a7b7cdec2b31
files teal-src/util/jwt.d.tl
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/teal-src/util/jwt.d.tl	Fri Mar 10 13:58:14 2023 +0100
+++ b/teal-src/util/jwt.d.tl	Fri Mar 10 13:58:43 2023 +0100
@@ -1,3 +1,4 @@
+local crypto = require "util.crypto"
 local record jwtlib
 	enum algorithm
 		"HS256"
@@ -19,13 +20,10 @@
 		"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