{ "info": { "author": "Justin Quick, The Washington Times", "author_email": "jquick@washingtontimes.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License" ], "description": "==========================\nCookie Sessions for Django\n==========================\n\nThis package contains a drop-in replacement middleware for ``django.contrib.sessions.middleware.SessionMiddleware`` to store all session data in a browser cookie instead of the database. The code is based on \n`a snippet from Christopher Lenz. `_ \n\nTo prevent user tampering the session dictionary goes through the following encoding steps:\n\n1. The session dictionary is converted into ``JSON``\n2. A ``SHA1`` hash is made with the ``JSON`` and the site's ``SECRET_KEY``\n3. The ``JSON`` and ``SHA1`` hash are concatenated, gzipped and base64 encoded.\n\nUpon decoding:\n\n1. The cookie is ``base64`` decoded and ungzipped\n2. The data is split into the ``SHA1`` hash and the ``JSON`` data\n3. The ``SHA1`` hash is regenerated from the received ``JSON`` data and the site's ``SECRET_KEY``\n4. If the hashes don't match, a ``SuspiciousOperation`` exception is raised. If the hashes match, the ``JSON`` data is converted into a python object and returned.\n\n\nInstall\n========\n\nPlace the ``cookiesession`` app into your ``INSTALLED_APPS``.\nNext, put the ``cookiesession.middleware.CookieSessionMiddleware`` middleware into your ``MIDDLEWARE_CLASSES``.\nThis middleware is designed as a replacement to ``django.contrib.sessions.middleware.SessionMiddleware``\n\n\nManagement Commands\n===================\n\nTwo management commands are included to make debugging things easier.\n\n``decode_session_cookie``\n Called as ``./manage.py decode_session_cookie `` and prints the keys and values of the session dictionary.\n\n\n``encode_session_cookie``\n Encodes key=val arguments into a cookie for manual insertion into your browser for testing purposes.\n You must call the command as ``./manage.py encode_cookie key1=value key2=value``. Prints out the encoded cookie string", "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/washingtontimes/django-cookiesession", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-cookiesession", "package_url": "https://pypi.org/project/django-cookiesession/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-cookiesession/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/washingtontimes/django-cookiesession" }, "release_url": "https://pypi.org/project/django-cookiesession/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A secure way to hold Django session data in cookies", "version": "0.1.1" }, "last_serial": 789377, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "75c197a7938dd314d2f0d8f9bb8b4745", "sha256": "77a518c3adcbf27b6968a7189c07b3d8a72be2f8f30d90b4a7a98618992d880d" }, "downloads": -1, "filename": "django-cookiesession-0.1.1.tar.gz", "has_sig": false, "md5_digest": "75c197a7938dd314d2f0d8f9bb8b4745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 537444, "upload_time": "2010-09-21T20:44:45", "url": "https://files.pythonhosted.org/packages/79/50/596ae10a6fb6628c6695587b02e60ada0f2739ec2458456978c4d73c8662/django-cookiesession-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "75c197a7938dd314d2f0d8f9bb8b4745", "sha256": "77a518c3adcbf27b6968a7189c07b3d8a72be2f8f30d90b4a7a98618992d880d" }, "downloads": -1, "filename": "django-cookiesession-0.1.1.tar.gz", "has_sig": false, "md5_digest": "75c197a7938dd314d2f0d8f9bb8b4745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 537444, "upload_time": "2010-09-21T20:44:45", "url": "https://files.pythonhosted.org/packages/79/50/596ae10a6fb6628c6695587b02e60ada0f2739ec2458456978c4d73c8662/django-cookiesession-0.1.1.tar.gz" } ] }