diff --git a/ietf/templates/api/index.html b/ietf/templates/api/index.html index 17aedb6c4..3afee7b69 100644 --- a/ietf/templates/api/index.html +++ b/ietf/templates/api/index.html @@ -322,6 +322,24 @@

or alternatively:

{{key.export_to_pem}}
+ +

+ To verify a signature and get the verified data using Python with the + jwcrypto module, + you could do: +

+from jwcrypto import jwk, jws
+
+# ... receive json web signed data as 'data', used below ...
+
+key = jwk.JWK()
+key.import_from_pem(API_PUBLIC_KEY_PEM)   # the key above
+jwstoken = jws.JWS()
+jwstoken.deserialize(data)
+jwstoken.verify(key)
+payload = jwstoken.payload
+        
+