summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove cli entrypointremove-cliJosé Padilla2020-06-191-177/+0
|
* Remove unnecessary compatibility shims for Python 2 (#498)Jon Dufresne2020-06-192-18/+1
| | | | | | | | | | | As the project is Python 3 only, can remove the compatibility shims in compat.py. Type checking has been simplified where it can: - str is iterable - bytes is iterable - use isinstance instead of issubclass The remaining function bytes_from_int() has been moved to utils.py.
* Fix `tox -e lint` warnings and errors (#490)Jon Dufresne2020-06-092-16/+15
| | | Now successfully passes when running `tox -e lint`.
* Run pyupgrade across project to use modern Python 3 conventions (#491)Jon Dufresne2020-06-086-97/+97
| | | | | | | | pyupgrade is a tool to automatically upgrade Python syntax for newer versions of the language. Running pyupgrade removes several Python-2-isms that are no longer necessary now that the project is Python 3 only. https://github.com/asottile/pyupgrade
* Add support for Ed25519 / EdDSA, with unit tests (#455)Someguy1232020-05-243-0/+90
|
* Require tweak (#280)Pau Ruiz Safont2020-05-141-0/+15
| | | | | | | | | | | * Use require options as a list, instead of booleans Deprecate the use of the boolean options * Add test for the new require option * Add documentation on how to use the require option Co-authored-by: Pau Ruiz i Safont <psafont@ebi.ac.uk>
* Fix 406 (#454)justinbaur2019-11-161-6/+29
| | | | | | | | | | * Added header option for encode * added tests and None check * updated quotes for consistency * format fixes after tox
* Remove Python 2.7 compatibility (#457)Bastien Vallet2019-11-122-17/+3
| | | | | | * Remove py27 support * [py27] Remove useless compatibility files
* DX Tweaks (#450)José Padilla2019-10-2112-879/+1061
| | | | | | | | | | * Setup pre-commit hooks * Run initial `tox -e lint` * Fix package name * Fix .travis.yml
* Fix linter error in test_cli (#414)Jason R. Coombs2019-05-041-1/+1
|
* Fix pytest and pinned test dependencies1.7.1José Padilla2018-12-063-3/+3
|
* Fix bug if application does not specify audience (#336)Derek Weitzel2018-03-151-0/+9
| | | | | | | | | | * Fix bug if application does not specify audience * Update changelog * Fixing blank line * Fixing error message with missing audience
* Fix #315: Raise InvalidSignatureError over generic DecodeError (#316)Markus Holtermann2017-12-011-2/+9
|
* Allow list of valid audiences to be passed in to PyJWT.decode() (#306)René Springer2017-11-263-4/+18
| | | Resolves #205,
* Fix over-eager fallback to stdin (#304)José Padilla2017-11-051-0/+31
| | | | | | | | * Fix over-eager fallback to stdin * Ignore .eggs dir * Add test to cover when terminal is not a TTY
* Warn about missing algorithms arg only when verify is TruePrzemysław Suliga2017-08-312-0/+31
| | | | | Since no signature verification will occur, passing in `algorithms` does not make much sense.
* Add warning when decoding with no algorithms specifiedJosé Padilla2017-06-222-0/+20
|
* Throw if key is an PKCS1 PEM-encoded public keyJosé Padilla2017-06-222-0/+12
|
* Change optparse for argparse. (#238)Froilan Irizarry2017-05-181-0/+127
|
* Non-numeric 'iat' now raises InvalidIssuedAtError on decode()190-remove-iat-verificationMark Adams2017-04-171-1/+1
|
* Stop rejecting tokens with future 'iat' valuesMark Adams2017-04-171-7/+0
| | | | | | | | | | RFC 7519 does not specify or even suggest this type of validation on the 'iat' claim and it has caused issues for several consumers of PyJWT. This change removes the validation on future 'iat' values and leaves such things up to the application developer to implement. Fixes #190.
* Add a failing test for OpenSSH-formatted ECDSA public keysMark Adams2017-03-142-0/+8
|
* Changes per code reviewLandon GB2016-11-301-1/+1
|
* Unit test for better errors when missing cryptography packageLandon GB2016-11-281-0/+6
|
* Fix all flake8 issues tox is complaining aboutLandon GB2016-11-282-0/+2
|
* Merge pull request #219 from mike9005/es521_fixMark Adams2016-10-241-4/+4
|\ | | | | Fix incorrectly named ECDSA algorithm
| * Catch a couple more typos in testsMichael Collis2016-09-261-2/+2
| |
| * Fix tests to matchMichael Collis2016-09-211-2/+2
| |
* | Add JWK support for HMAC and RSA keysadd-jwk-for-hmac-rsaMark Adams2016-08-287-105/+333
|/ | | | | | | - JWKs for RSA and HMAC can be encoded / decoded using the .to_jwk() and .from_jwk() methods on their respective jwt.algorithms instances - Replaced tests.utils ensure_unicode and ensure_bytes with jwt.utils versions
* Fix a bug where a PEM private key as bytes raises a TypeErrorfix-type-error-on-bytes-keyMark Adams2016-08-041-0/+14
|
* Remove some erroenous @pytest.mark.skipif decoratorsmadams/cleanup-test-skipsMark Adams2016-05-051-4/+0
|
* binary_type verification added to make the code more future-proofMauricio Aizaga2015-10-231-4/+6
|
* Fixed #183 AttributeError: 'NoneType' object has no attribute 'rsplit'Mauricio Aizaga2015-10-221-0/+18
| | | | | | The issue also occurs when payload is int raising: AttributeError: 'int' object has no attribute 'rsplit' Test for None and int payload added
* Change TypeError on bad `kid` to InvalidTokenErrorGabriel Gironda2015-07-231-4/+4
|
* Fail on encode and decode of bad JWS header valuesGabriel Gironda2015-07-211-2/+25
| | | | | | | | | | | | | | | The JWS spec: https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4.1.4 States that if `kid` is present then it **MUST** be a string. Currently, the library allows silent creation of invalid JWS (and thus, JWT), as it allows any type for `kid`. This commit adds checks to help ensure output meets the spec. * Add jwt.api_jws.PyJWS._validate_headers for validating JWS headers on encode and decode * Add tests
* Changed test function nameAlexandru Mihai2015-06-231-1/+1
|
* Remove unused variableAlexandru Mihai2015-06-231-1/+1
|
* Merge branch 'master' of https://github.com/jpadilla/pyjwtAlexandru Mihai2015-06-222-12/+60
|\
| * Added new options for requiring exp, iat, and nbf claims.Mark Adams2015-06-022-12/+60
| | | | | | | | Thanks to David Black <dblack@atlassian.com> for the suggestion.
* | Added test for verify signature with empty algoAlexandru Mihai2015-06-221-0/+10
|/
* Removed tests that are no longer necessary now that we have test vectors ↵Mark Adams2015-05-191-66/+33
| | | | from RFC 7520
* Removed the @skipif from the RSA-PSS test vector test.Mark Adams2015-05-191-1/+0
|
* Merged master branch in to remove Python 3.2 support and add the newMark Adams2015-05-189-1/+248
|\ | | | | | | test vectors from #160
| * Added test vectors from the IETF JOSE Cookbook for HMAC, RSA, and EC.Mark Adams2015-05-188-1/+239
| |
| * Added get_unverified_header method so that unverified headers can be ↵Mark Adams2015-05-081-0/+9
| | | | | | | | retrieved by the application. Closes #155
* | Test signatures with wrong lengthesneider2015-05-151-0/+14
| |
* | Fix the ECDSA signature serialization format when using cryptographyesneider2015-05-133-18/+14
| |
* | Fix the ECDSA signature serialization formatesneider2015-05-101-12/+9
|/
* `verify_expiration` was removed too soonbring-verify_expiration-backJosé Padilla2015-04-261-0/+20
| | | | - Merge with `verify_exp` option - Add deprecation warning
* Split tests between PyJWS and PyJWT object responsiblitiesMark Adams2015-04-192-502/+612
|