File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -235,3 +235,26 @@ def test_pick_key():
235
235
236
236
_k = pick_key (keys , "enc" , "ECDH-ES" )
237
237
assert len (_k ) == 0
238
+
239
+
240
+ def test_eddsa_jwt ():
241
+ JWKS_DICT = {
242
+ "keys" : [
243
+ {
244
+ "kty" : "OKP" ,
245
+ "kid" : "-1909572257" ,
246
+ "crv" : "Ed25519" ,
247
+ "x" : "XWxGtApfcqmKI7p0OKnF5JSEWMVoLsytFXLEP7xZ_l8" ,
248
+ }
249
+ ]
250
+ }
251
+ JWT_TEST = (
252
+ "eyJraWQiOiItMTkwOTU3MjI1NyIsImFsZyI6IkVkRFNBIn0."
253
+ + "eyJqdGkiOiIyMjkxNmYzYy05MDkzLTQ4MTMtODM5Ny1mMTBlNmI3MDRiNjgiLCJkZWxlZ2F0aW9uSWQiOiJiNGFlNDdhNy02MjVhLTQ2MzAtOTcyNy00NTc2NGE3MTJjY2UiLCJleHAiOjE2NTUyNzkxMDksIm5iZiI6MTY1NTI3ODgwOSwic2NvcGUiOiJyZWFkIG9wZW5pZCIsImlzcyI6Imh0dHBzOi8vaWRzdnIuZXhhbXBsZS5jb20iLCJzdWIiOiJ1c2VybmFtZSIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsImlhdCI6MTY1NTI3ODgwOSwicHVycG9zZSI6ImFjY2Vzc190b2tlbiJ9."
254
+ + "rjeE8D_e4RYzgvpu-nOwwx7PWMiZyDZwkwO6RiHR5t8g4JqqVokUKQt-oST1s45wubacfeDSFogOrIhe3UHDAg"
255
+ )
256
+ ISSUER = "https://idsvr.example.com"
257
+ kj = KeyJar ()
258
+ kj .add_kb (ISSUER , KeyBundle (JWKS_DICT ))
259
+ jwt = JWT (key_jar = kj )
260
+ _ = jwt .unpack (JWT_TEST )
You can’t perform that action at this time.
0 commit comments