-
Notifications
You must be signed in to change notification settings - Fork 33
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
Merge develop for version 1.2.1 #11
Merged
Merged
Conversation
This file contains 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
Before this commit, passing a non existing file to --self.path_to_key resulted in a FileNotFoundError. This has been now handled
Since the deprecation status of complex_payload method, a warning about it has been placed in the code, spawning when users call that method. It was placed in a for loop so the warning spawned as many times as complex_payload was called. It now has been moved outside the for loop
Preceding the new feature token_only --token-only, that it's going to ignore warnings and other infos, printing out only the generated JWT, a method called ifprint has been defined. It takes two parameter: condition and string. If condition is true, the function prints out string. So we can pass the new option token_only as condition to determine what to print. In our secific case the condition has to be passed as negative (not <condition>)
Added the option --quiet for conditional printing, and applied it wherever it's possible. It's not been applied to errors, since triggering an error users have no need of a quiet mode. This can be changed later
Implemented a method to convert pem format items to der ones. Implemented also a dissect_token method, that split a token in two parts; the original message and the signature. This is also in prevision of a new functionality that's going to be introduced with next releases.
In order to avoid the user having to spiecify the algortihm during a token verification, a method to extract the alg from the original base64 encoded JWT header. This is due since during validation we can't access the token dictionary (the dictionarize_token method is called after validation is done and we can't do it before, or we can run through errors since token has not been validated yet). Using this function cuold sound a bit of repetitive, the only alternative is to declare the variables containing the splitted and decoded token information in the init method, before validation run, and than initialize them during validation. Anyway this will require an extra step, casting those infomration to dict type, that's not included in the current process. Last, a new important feature is going to be implemented with next releases, that will make use of this new method too
…user to specify an algorithm Since now, verifying operations, required the user to specify an algorithm. This was not the way since, in order to perform a reliable verification, every change in the token should be ignored. After some test, this is going to be extended to the find_verifier_key_from_jwks_and_quit method too
Now finding verifier key from a jwks file does not required the user to specifying an algorithm anymore
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.
Merging develop branch for new release