@@ -23,39 +23,4 @@ The ``pyjwt[crypto]`` format is recommended in requirements files in
2323projects using ``PyJWT ``, as a separate ``cryptography `` requirement line
2424may later be mistaken for an unused requirement and removed.
2525
26- .. _legacy-deps :
27-
28- Legacy Dependencies
29- -------------------
30-
31- Some environments, most notably Google App Engine, do not allow the installation
32- of Python packages that require compilation of C extensions and therefore
33- cannot install ``cryptography ``. If you can install ``cryptography ``, you
34- should disregard this section.
35-
36- If you are deploying an application to one of these environments, you may
37- need to use the legacy implementations of the digital signature algorithms:
38-
39- .. code-block :: console
40-
41- $ pip install pycrypto ecdsa
42-
43- Once you have installed ``pycrypto `` and ``ecdcsa ``, you can tell PyJWT to use
44- the legacy implementations with ``jwt.register_algorithm() ``. The following
45- example code shows how to configure PyJWT to use the legacy implementations
46- for RSA with SHA256 and EC with SHA256 signatures.
47-
48- .. code-block :: python
49-
50- import jwt
51- from jwt.contrib.algorithms.pycrypto import RSAAlgorithm
52- from jwt.contrib.algorithms.py_ecdsa import ECAlgorithm
53-
54- jwt.unregister_algorithm(' RS256' )
55- jwt.unregister_algorithm(' ES256' )
56-
57- jwt.register_algorithm(' RS256' , RSAAlgorithm(RSAAlgorithm.SHA256 ))
58- jwt.register_algorithm(' ES256' , ECAlgorithm(ECAlgorithm.SHA256 ))
59-
60-
6126.. _`cryptography` : https://cryptography.io
0 commit comments