Merged
Conversation
jose/jwk.py
Outdated
|
|
||
| if not jwk.get('kty') == 'RSA': | ||
| raise JWKError("Incorrect key type. Expected: 'RSA', Recieved: %s" % jwk.get('kty')) | ||
| def process_jwk(self, jwk_dict): |
Contributor
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_jwkmethod to serialize Keys to a JWK dictThe old way:
The new way:
@crgk You input would be appreciated if you were interested.