{
"info": {
"author": "J. Ryan Littlefield",
"author_email": "",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.6"
],
"description": "Platform-Agnostic Security Tokens for Python\n============================================\n.. image:: https://img.shields.io/pypi/v/paseto.svg\n :alt: PyPI\n :target: https://pypi.python.org/pypi/paseto\n.. image:: https://img.shields.io/pypi/l/paseto.svg\n :alt: PyPI - License\n :target: https://pypi.python.org/pypi/paseto\n\n\n.. image:: https://travis-ci.org/rlittlefield/pypaseto.svg?branch=master\n :target: https://travis-ci.org/rlittlefield/pypaseto\n\nThis is an unofficial initial implementation of\n`PASETO: Platform-Agnostic Security Tokens `_ for Python.\n\nThis is not yet production-ready; use at your own risk.\n\nForked from `https://github.com/JimDabell/pypast `_,\nwhich was originally designed for an earlier spec of PASETO when it was still\nPAST.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n\tpip install paseto\n\n\nUsage\n-----\n\nThis is still in early development. It has not been reviewed in a security\naudit yet, so please be aware that it is not expected to be ready for use in\nproduction systems.\n\nIt currently only supports basic encrypt/decrypt of the \"local\" token type, V2.\nV1 is not as nice as V2, but we will accept a functional, clean, secure pull\nrequest for a V1 if you are interested.\n\nTo create/parse paseto tokens, use the create/parse functions. These will\nautomatically handle encoding/decoding the JSON payload for you, and validate\nclaims (currently just the 'exp' expiration registered claim).\n\n\n.. code-block:: python\n\n\timport paseto\n\timport secrets\n\tmy_key = secrets.token_bytes(32)\n\t# > b'M\\xd48b\\xe2\\x9f\\x1e\\x01[T\\xeaA1{Y\\xd1y\\xfdx\\xb5\\xb7\\xbedi\\xa3\\x96!`\\x88\\xc2n\\xaf'\n\n\t# create a paseto token that expires in 5 minutes (300 seconds)\n\ttoken = paseto.create(\n\t\tkey=my_key,\n\t\tpurpose='local',\n\t\tclaims={'my claims': [1, 2, 3]},\n\t\texp_seconds=300\n\t)\n\t# > b'v2.local.g7qPkRXfUVSxx3jDw6qbAVDvehtz_mwawYsCd5IQ7VmxuRFIHxY9djMaR8M7LWvCSvCZu8NUk-Ta8zFC5MpUXldBCKq8NtCG31wsoKv8zCKwDs9LuWy4NX3Te6rvlnjDMcI_Iw'\n\n\tparsed = paseto.parse(\n\t\tkey=my_key,\n\t\tpurpose='local',\n\t\ttoken=token,\n\t)\n\tprint(parsed['message'])\n\n\nYou can also make and verify v2.public tokens, which are signed but not\nencrypted:\n\n.. code-block:: python\n\n\timport paseto\n\timport pysodium\n\tpubkey, privkey = pysodium.crypto_sign_keypair()\n\t# pubkey > b'\\xa7\\x0b\\x14\\xec\\x03\\x97\\x90\\x86\\x14\\x12\\xa0x:)\\x97\\xed\\xdf\\x81\\xc3\\xe4\\x95\\xd7R\\xfe\\x9bT\\xba,\\x92\\x0c\\xb9P'\n\t# privkey > b'@\\x1fg\\x9b\\x83b$\\xcdJP{\\x93\\xe8[\\xae\\x05.\\xe9\\xcb\\x13\\xe7`v\\xa67\\xd6\\xb47\\x7f\\x96\\xdf0\\xa7\\x0b\\x14\\xec\\x03\\x97\\x90\\x86\\x14\\x12\\xa0x:)\\x97\\xed\\xdf\\x81\\xc3\\xe4\\x95\\xd7R\\xfe\\x9bT\\xba,\\x92\\x0c\\xb9P'\n\n\ttoken = paseto.create(\n\t\tkey=privkey,\n\t\tpurpose='public',\n\t\tclaims={'my claims': [1, 2, 3]},\n\t\texp_seconds=300\n\t)\n\t# > b'v2.public.eyJteSBjbGFpbXMiOiBbMSwgMiwgM10sICJleHAiOiAiMjAxOC0wMy0xM1QxNDo0MzozNC0wNjowMCJ9vjeSnGkfEk7tkHg5gj07vFo-YYBMTYEuSG00SqQ6iaYMeLMcc9puiOOUsu0buTziYeEmE9Fahtm1pi2PSPZpDA'\n\n\tparsed = paseto.parse(\n\t\tkey=pubkey,\n\t\tpurpose='public',\n\t\ttoken=token,\n\t)\n\t# > {'message': {'my claims': [1, 2, 3], 'exp': '2018-03-13T14:43:34-06:00'}, 'footer': None}\n\tprint(parsed['message'])",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/rlittlefield/pypaseto",
"keywords": "past security stateless tokens",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "paseto",
"package_url": "https://pypi.org/project/paseto/",
"platform": "",
"project_url": "https://pypi.org/project/paseto/",
"project_urls": {
"Homepage": "https://github.com/rlittlefield/pypaseto"
},
"release_url": "https://pypi.org/project/paseto/0.0.5/",
"requires_dist": null,
"requires_python": "",
"summary": "Platform-Agnostic Security Tokens for Python (PASETO)",
"version": "0.0.5"
},
"last_serial": 3669341,
"releases": {
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "4fd0c8500d536a67b381a33f26bd5b86",
"sha256": "07ff1c66da3ba40325506188c1d4e5177dc41997ce73cd610280ee3cfdb21cfb"
},
"downloads": -1,
"filename": "paseto-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "4fd0c8500d536a67b381a33f26bd5b86",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2984,
"upload_time": "2018-03-08T08:23:53",
"url": "https://files.pythonhosted.org/packages/81/51/6f9e95ac203d8f3ad537dbba811e5171a90fc874d0d0ff2ad6bc27e8e225/paseto-0.0.2.tar.gz"
}
],
"0.0.3": [
{
"comment_text": "",
"digests": {
"md5": "bc6d7ad035030a9dd9d5f887d72ba503",
"sha256": "48836ca60080a75e2d32b097e9b4ad4184d05812b693fb56b3e7eaa5817e1e54"
},
"downloads": -1,
"filename": "paseto-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "bc6d7ad035030a9dd9d5f887d72ba503",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3782,
"upload_time": "2018-03-09T18:30:27",
"url": "https://files.pythonhosted.org/packages/45/62/fbcd7b3797ed074bdae2b4fe9fab5df2b7d6f3b9adce2e6f8652d1d0261d/paseto-0.0.3.tar.gz"
}
],
"0.0.4": [
{
"comment_text": "",
"digests": {
"md5": "c58025c606c8bde8a5ec7b8378d9459c",
"sha256": "102d9f29be4bbd3081614f8c893a7cbcb86483422b09915d639ce1be48391eb1"
},
"downloads": -1,
"filename": "paseto-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "c58025c606c8bde8a5ec7b8378d9459c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4552,
"upload_time": "2018-03-10T19:49:00",
"url": "https://files.pythonhosted.org/packages/bd/78/b5b9342934a7c23890f9df9b406d9c2d2e13e19a915927ae2eef1bc16ca7/paseto-0.0.4.tar.gz"
}
],
"0.0.5": [
{
"comment_text": "",
"digests": {
"md5": "2cba372d2bdacd3b6bb7e44619065f97",
"sha256": "440d7d203d2ff9a002619c9382b8ad738f1aa5c5ca9c3589b224bf6af476b132"
},
"downloads": -1,
"filename": "paseto-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "2cba372d2bdacd3b6bb7e44619065f97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6742,
"upload_time": "2018-03-14T15:46:10",
"url": "https://files.pythonhosted.org/packages/84/ed/3ed8fe8b6e2f9451470972e3eeb2e049c3ccf446d73a1c5a8090020514fa/paseto-0.0.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "2cba372d2bdacd3b6bb7e44619065f97",
"sha256": "440d7d203d2ff9a002619c9382b8ad738f1aa5c5ca9c3589b224bf6af476b132"
},
"downloads": -1,
"filename": "paseto-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "2cba372d2bdacd3b6bb7e44619065f97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6742,
"upload_time": "2018-03-14T15:46:10",
"url": "https://files.pythonhosted.org/packages/84/ed/3ed8fe8b6e2f9451470972e3eeb2e049c3ccf446d73a1c5a8090020514fa/paseto-0.0.5.tar.gz"
}
]
}