# HG changeset patch # User Kim Alvefur # Date 1678453123 -3600 # Node ID 245ffbb06f5523ef2d07ef9281b208fe36f31585 # Parent 916af6fcef1ed1f7cf33efb3d3d837f9b9be85a2 util.jwt: Import definition of key from util.crypto Turns out we had a definition of that already diff -r 916af6fcef1e -r 245ffbb06f55 teal-src/util/jwt.d.tl --- 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