Skip to main content

Datasette plugin that authenticates users based on existing domain cookies

Project description

datasette-auth-existing-cookies

PyPI CircleCI License

Datasette plugin that authenticates users based on existing domain cookies.

STATUS: Work in progress. This is currently insecure. Do not use it.

When to use this

This plugin allows you to build custom authentication for Datasette when you are hosting a Datasette instance on the same domain as another, authenticated website.

Consider a website on www.example.com which supports user authentication.

You could run Datasette on data.example.com in a way that lets it see cookies that were set for the .example.com domain.

Using this plugin, you could build an API endpoint at www.example.com/user-for-cookies which returns a JSON object representing the currently signed-in user, based on their cookies.

The plugin can protect any hits to any data.example.com pages by passing their cookies through to that API and seeing if the user should be logged in or not.

You can also use subclassing to decode existing cookies using some other mechanism.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_auth_existing_cookies-0.2a0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette_auth_existing_cookies-0.2a0-py3-none-any.whl.

File metadata

  • Download URL: datasette_auth_existing_cookies-0.2a0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for datasette_auth_existing_cookies-0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a9c8c6be3001a3436c588295e5b7a284d56a6dfde6f24f681fe12ebc1e1bd96
MD5 1c5135ef9d7335d40b1d093be6e26a79
BLAKE2b-256 3ee1e0cecad46abffcd5d7b44709e5143da3601f4c34ee7a41d7f30f0ed57970

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page