Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

118 Zeilen
2.5 KiB

  1. Metadata-Version: 2.1
  2. Name: jwt
  3. Version: 0.6.1
  4. Summary: JSON Web Token library for Python 3.
  5. Home-page: https://github.com/GehirnInc/python-jwt
  6. Author: Kohei YOSHIDA
  7. Author-email: kohei.yoshida@gehirn.co.jp
  8. License: UNKNOWN
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 4 - Beta
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: Apache Software License
  13. Classifier: Operating System :: OS Independent
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 3.5
  16. Classifier: Programming Language :: Python :: 3.6
  17. Classifier: Programming Language :: Python :: 3.7
  18. Classifier: Topic :: Internet :: WWW/HTTP
  19. Classifier: Topic :: Security
  20. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  21. Requires-Dist: cryptography (<3.*,>=2.2.2)
  22. .. image:: https://travis-ci.org/GehirnInc/python-jwt.svg?branch=master
  23. :target: https://travis-ci.org/GehirnInc/python-jwt
  24. .. image:: https://coveralls.io/repos/GehirnInc/python-jwt/badge.png?branch=master
  25. :target: https://coveralls.io/r/GehirnInc/python-jwt?branch=master
  26. .. image:: https://badge.fury.io/py/jwt.svg?dummy
  27. :target: http://badge.fury.io/py/jwt
  28. python-jwt
  29. ==========
  30. *python-jwt* is a JSON Web Token (JWT) implementation in Python developed by `Gehirn Inc`_.
  31. Examples
  32. --------
  33. .. code-block:: python
  34. import json
  35. from jwt import (
  36. JWT,
  37. jwk_from_dict,
  38. jwk_from_pem,
  39. )
  40. message = {
  41. 'iss': 'https://example.com/',
  42. 'sub': 'yosida95',
  43. 'iat': 1485969205,
  44. 'exp': 1485972805,
  45. }
  46. with open('rsa_private_key.pem', 'rb') as fh:
  47. signing_key = jwk_from_pem(fh.read())
  48. jwt = JWT()
  49. compact_jws = jwt.encode(message, signing_key, 'RS256')
  50. with open('rsa_public_key.json', 'r') as fh:
  51. verifying_key = jwk_from_dict(json.load(fh))
  52. message_received = jwt.decode(compact_jws, verifying_key)
  53. assert message == message_received
  54. Installation
  55. ------------
  56. You can install python-jwt with pip.
  57. .. code-block:: shell
  58. $ pip install jwt
  59. Implementation Details
  60. -------------------------
  61. Supported Algorithms
  62. ~~~~~~~~~~~~~~~~~~~~
  63. - Unsecured
  64. - none
  65. - Symmetric
  66. - HS256
  67. - HS384
  68. - HS512
  69. - Asymmetric
  70. - RS256
  71. - RS384
  72. - RS512
  73. Supported Python Versions
  74. ~~~~~~~~~~~~~~~~~~~~~~~~~
  75. - Python 3.5
  76. - Python 3.6
  77. - Python 3.7
  78. License
  79. -------
  80. python-jwt is licensed under the Apache License version 2. See ./LICENSE.rst.
  81. .. _Gehirn Inc: http://www.gehirn.co.jp/