#118 Use JWKSet.export if it is available
Merged 7 years ago by puiterwijk. Opened 7 years ago by puiterwijk.
puiterwijk/ipsilon fix-jwcrypto-0.3.0  into  master

@@ -743,6 +743,10 @@ 

              'Content-Type': 'application/json'

          })

  

+         if 'export' in dir(self.cfg.keyset):

+             # This function was added to jwcrypto 0.3.0

+             return self.cfg.keyset.export(private_keys=False)

+ 

          # Sent to jwcrypto as https://github.com/latchset/jwcrypto/pull/20

          keys = []

          for key in self.cfg.keyset:

This function was released as part of the jwcrypto 0.3.0 release, so if it is
available, that function is prefered over our manual building of the keyset.

Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com

rebased

7 years ago

rebased

7 years ago

Looks like it's equivalent, based on my reading of the jwcrypto code. +1 from me.

rebased

7 years ago

Pull-Request has been merged by puiterwijk

7 years ago

This was reverted.
The problem is that this breaks with jwcrypto 0.2.0, since it doesn't accept the private_keys argument for the export function.
We will need to fix this by hacking around.

Metadata