{ "info": { "author": "Joel Burton", "author_email": "joel@joelburton.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Viewpass\n========\n\nOverview\n--------\n\nThis is a system for allowing the creation and use of URLs that contain a token that allows\na site visitor, even an anonymous visitor, access to pages that might not normally be allowed\nto visit.\n\nFor example, say you have a report page at `/report/` that normally requires the permission\n'reporting.view_report' to view. However, you'd like to be able to send emails to some friends\nto allow them to view this page without needing an account.\n\nViewpass is:\n\n- a utility to craft URLs with embedded, cryptographically-signed information about a\n permission\n\n- a Django middleware that intercepts URLs with these kind of URLs, and stores information\n about that permission onto the user object.\n\nInstalling\n----------\n\nAdd 'viewpass' to the `INSTALLED_APPS`::\n\n INSTALLED_APPS = [\n # ...\n 'viewpass',\n ]\n\nAdd it to the middleware classes: This need to be after the Authentication Middleware (since\nwe need a user!). A good arrangement could be::\n\n MIDDLEWARE_CLASSES = [\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.common.CommonMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'viewpass.middleware.ViewPassMiddleware',\n 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n ]\n\nAdd viewpass to the `AUTHENTICATION_BACKENDS`::\n\n AUTHENTICATION_BACKENDS = [\n 'viewpass.backends.ViewPassBackend',\n 'django.contrib.auth.backends.ModelBackend'\n ]\n\n.. TODO\n\n should this stuff be added automatically via AppConfig?\n\nGenerating Viewpass URLs\n------------------------\n\nYou can generate the proper URL for them by using the method `util.get_viewpass_url`, like::\n\n get_viewpass_url('/report/', 'reporting.view_report')\n\nThis URL will look like `/report/?viewpass=STRING1:STRING2` and visitors can use this URL to\nvisit the `/report/` page.\n\nThe STRING1 and STRING2 are encoded versions of the timestamp/path/permission-to-grant and a\nsigned copy of the path/permission-to-grant, respectively. This prevents any tampering by users\ntrying to re-use a viewpass URL to view another page or to change the permission granted.\n(The timestamp is not used but can be used to create time-limited URLs; you can edit the\n`signing.loads()` call in `viewpass.middleware.ViewPassMiddleware` to add a\n`max_age=` parameter).\n\nAs a convenience, you can also use the template tag to generate the proper URL. On the template\nthat is used by `/report/`, you can include::\n\n {% load viewpass_tags %}\n Get public URL\n\nThis will show a link with the viewpass URL on it.\n\nCredit\n======\n\nViewpass is written and maintained by Joel Burton .\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/joelburton/django-viewpass/tarball/1.0.5", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joelburton/viewpass.git", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "django-viewpass", "package_url": "https://pypi.org/project/django-viewpass/", "platform": "", "project_url": "https://pypi.org/project/django-viewpass/", "project_urls": { "Download": "https://github.com/joelburton/django-viewpass/tarball/1.0.5", "Homepage": "https://github.com/joelburton/viewpass.git" }, "release_url": "https://pypi.org/project/django-viewpass/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "A Django app to provide access to protected resources via URL tokens.", "version": "1.1.0" }, "last_serial": 2535537, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "8e3ca0be05b6508874341ba87ae6bcd9", "sha256": "747cae0645eed2f6d1bf5b237440e2d28e1124c6de97d5a2fedca307fd3c88dc" }, "downloads": -1, "filename": "django-viewpass-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8e3ca0be05b6508874341ba87ae6bcd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4760, "upload_time": "2015-12-22T06:05:01", "url": "https://files.pythonhosted.org/packages/04/7d/2e6313108e00c029e3c7071732081f4eb3b77da9c02479d310b6cdbab2c3/django-viewpass-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "e3789e6340816f5985de729528b7ded7", "sha256": "309730a9ec370e4b703843643fb1b303d02114cf7fc97c0ba9a7e71c6fe2b1c6" }, "downloads": -1, "filename": "django-viewpass-1.0.2.tar.gz", "has_sig": false, "md5_digest": "e3789e6340816f5985de729528b7ded7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5065, "upload_time": "2015-12-22T07:10:04", "url": "https://files.pythonhosted.org/packages/76/30/565376a2672a863c45e75154c10f0d2c07033d2eead2cdef25f8db953b9d/django-viewpass-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "cd3795f8add54dd64182f55c9427316d", "sha256": "f8244df9338be7dfe0ba0c78e5ee066fd2c71da203d56aca057cc199c53c2172" }, "downloads": -1, "filename": "django-viewpass-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cd3795f8add54dd64182f55c9427316d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5164, "upload_time": "2016-01-10T22:02:27", "url": "https://files.pythonhosted.org/packages/e9/8f/87446523489c31ed791b9461cf5c7e5893f22bc81c86c59862e33d60bc45/django-viewpass-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "5c17d42662eddb5c849fe1630e4d4297", "sha256": "102574aaf39e05053bb22451743c8b82578cb336c9240f3683d240bfb19877a6" }, "downloads": -1, "filename": "django-viewpass-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5c17d42662eddb5c849fe1630e4d4297", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5162, "upload_time": "2016-01-10T22:10:18", "url": "https://files.pythonhosted.org/packages/7f/8f/718b3063fab373234d12dead4c181cce389b282c26dfff7e7aaea3d956b0/django-viewpass-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "ac9118750f3138e7e909ff5396b909b1", "sha256": "f2d5477d0afc11a499e5ce155a34b49e47f82950e256c3dbe111a94e9b9fcaa8" }, "downloads": -1, "filename": "django-viewpass-1.0.5.tar.gz", "has_sig": false, "md5_digest": "ac9118750f3138e7e909ff5396b909b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5262, "upload_time": "2016-01-10T22:43:40", "url": "https://files.pythonhosted.org/packages/74/df/6fb6227b706c99ded55476758f9df5af3b28d1b29b53fb6b5abfb2a16809/django-viewpass-1.0.5.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "af9bbd5396dd09ac3643fe4a01b5d7d9", "sha256": "d862334347f5666efcfb63942f69f7a944e03d0fb2806cb864b1f868be680aa6" }, "downloads": -1, "filename": "django-viewpass-1.1.0.tar.gz", "has_sig": false, "md5_digest": "af9bbd5396dd09ac3643fe4a01b5d7d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5250, "upload_time": "2016-12-22T20:10:56", "url": "https://files.pythonhosted.org/packages/c3/cc/63859b0b9499fb8714e3ccc79f3bacfe5ea21251056aa0cd5dce4a0cda68/django-viewpass-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af9bbd5396dd09ac3643fe4a01b5d7d9", "sha256": "d862334347f5666efcfb63942f69f7a944e03d0fb2806cb864b1f868be680aa6" }, "downloads": -1, "filename": "django-viewpass-1.1.0.tar.gz", "has_sig": false, "md5_digest": "af9bbd5396dd09ac3643fe4a01b5d7d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5250, "upload_time": "2016-12-22T20:10:56", "url": "https://files.pythonhosted.org/packages/c3/cc/63859b0b9499fb8714e3ccc79f3bacfe5ea21251056aa0cd5dce4a0cda68/django-viewpass-1.1.0.tar.gz" } ] }