{ "info": { "author": "Jeff Lindsay, Ryan Tilder", "author_email": "rtilder@mozilla.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Utilities" ], "description": "PyJWT-mozilla\n=============\n\nA Python implementation of [JSON Web Token draft 01](http://self-issued.info/docs/draft-jones-json-web-token-01.html).\n\nThis is Mozilla's fork of [PyJWT](http://pypi.python.org/pypi/PyJWT)\nwhich adds RSA algorithms, fixes some timing\nattacks, and makes a few other adjustments. It is used in projects such as\n[webpay](https://github.com/mozilla/webpay).\n\nInstalling\n----------\n\nInstall the module with [pip](http://www.pip-installer.org/) or something similar:\n\n pip install PyJWT-mozilla\n\nThis install step will also install/compile\n[M2Crypto](http://pypi.python.org/pypi/M2Crypto)\nso you will need `swig` for this. You can get it with a package manager like:\n\n brew install swig\n\nAlternatively you can probably find a binary package for M2Crypto with\nsomething like this:\n\n sudo apt-get install python-m2crypto\n\n\nUsage\n-----\n\n import jwt\n jwt.encode({\"some\": \"payload\"}, \"secret\")\n\nNote the resulting JWT will not be encrypted, but verifiable with a secret key.\n\n jwt.decode(\"someJWTstring\", \"secret\")\n\nIf the secret is wrong, it will raise a `jwt.DecodeError` telling you as such. You can still get at the payload by setting the verify argument to false.\n\n jwt.decode(\"someJWTstring\", verify=False)\n\nAlgorithms\n----------\n\nThe JWT spec supports several algorithms for cryptographic signing. This library currently supports:\n\n* HS256\t- HMAC using SHA-256 hash algorithm (default)\n* HS384\t- HMAC using SHA-384 hash algorithm\n* HS512 - HMAC using SHA-512 hash algorithm\n* RS256 - RSA using SHA-256 hash algorithm\n* RS384 - RSA using SHA-384 hash algorithm\n* RS512 - RSA using SHA-584 hash algorithm\n\nChange the algorithm with by setting it in encode:\n\n jwt.encode({\"some\": \"payload\"}, \"secret\", \"HS512\")\n\nTests\n-----\n\nInstall the project in a [virtualenv](http://pypi.python.org/pypi/virtualenv)\n(or wherever) by typing this from the root:\n\n python setup.py develop\n\nRun the tests like this:\n\n python tests/test_jwt.py\n\nLicense\n-------\n\nMIT", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rtilder/pyjwt", "keywords": "jwt json web token security signing", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "PyJWT-mozilla", "package_url": "https://pypi.org/project/PyJWT-mozilla/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyJWT-mozilla/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/rtilder/pyjwt" }, "release_url": "https://pypi.org/project/PyJWT-mozilla/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "JSON Web Token implementation in Python", "version": "0.1.5" }, "last_serial": 1480653, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "340069226a190dd98b8dcca1762e7611", "sha256": "41e8e304e1ab3e38dcea3a17429ecc908329f21e388631d730fd3d6a08de0ee6" }, "downloads": -1, "filename": "PyJWT-mozilla-0.1.5.tar.gz", "has_sig": false, "md5_digest": "340069226a190dd98b8dcca1762e7611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5377, "upload_time": "2015-03-27T19:53:40", "url": "https://files.pythonhosted.org/packages/ac/c1/1d5342c589897cab9f1bc793d0849834a55b771a868a28268718faf745b6/PyJWT-mozilla-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "340069226a190dd98b8dcca1762e7611", "sha256": "41e8e304e1ab3e38dcea3a17429ecc908329f21e388631d730fd3d6a08de0ee6" }, "downloads": -1, "filename": "PyJWT-mozilla-0.1.5.tar.gz", "has_sig": false, "md5_digest": "340069226a190dd98b8dcca1762e7611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5377, "upload_time": "2015-03-27T19:53:40", "url": "https://files.pythonhosted.org/packages/ac/c1/1d5342c589897cab9f1bc793d0849834a55b771a868a28268718faf745b6/PyJWT-mozilla-0.1.5.tar.gz" } ] }