summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey <casey.duquette@snapchat.com>2018-03-22 19:11:54 -0700
committerJosé Padilla <jpadilla@webapplicate.com>2018-03-22 22:11:54 -0400
commit54a39aec6a0289ad0fa920dff214753cab9339b9 (patch)
treeda2f5f26b347bd35e7e8b31ea234c730bfc72d32
parent285afade1d14eb810615c5bc751ea2c6a7a3314a (diff)
downloadpyjwt-54a39aec6a0289ad0fa920dff214753cab9339b9.tar.gz
Update legacy instructions for using pycrypto (#337)
Related to #181 where users see `ValueError: Algorithm already has a handler.` after trying to register pycrypto algorithms.
-rw-r--r--docs/installation.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/installation.rst b/docs/installation.rst
index 35b03dd..a10cddd 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -46,6 +46,9 @@ for RSA with SHA256 and EC with SHA256 signatures.
from jwt.contrib.algorithms.pycrypto import RSAAlgorithm
from jwt.contrib.algorithms.py_ecdsa import ECAlgorithm
+ jwt.unregister_algorithm('RS256')
+ jwt.unregister_algorithm('ES256')
+
jwt.register_algorithm('RS256', RSAAlgorithm(RSAAlgorithm.SHA256))
jwt.register_algorithm('ES256', ECAlgorithm(ECAlgorithm.SHA256))