-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWK Refactor #17
JWK Refactor #17
Conversation
|
||
if not jwk.get('kty') == 'RSA': | ||
raise JWKError("Incorrect key type. Expected: 'RSA', Recieved: %s" % jwk.get('kty')) | ||
def process_jwk(self, jwk_dict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this method meant to be used directly? I don't see how somebody would want/need to call this on an instance of RSAKey
, since you have to prepare a key to get an instance.
Making it _process_jwk
would indicate that it is an implementation detail more than an API, if that's your intent
Current coverage is 95.37%@@ master #17 diff @@
==========================================
Files 7 7
Lines 428 454 +26
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 409 433 +24
- Misses 19 21 +2
Partials 0 0
|
705475a
to
3085f9a
Compare
This is the beginning of a refactor of JWK objects so that can begin their journey to not being horrible. I am hoping that JWKs can be a first class object just like JWS and JWT are.
Still TODO:
to_jwk
method to serialize Keys to a JWK dictThe old way:
The new way:
@crgk You input would be appreciated if you were interested.