Skip to main content

library functions for connecting external apps to/from opencore

Project description

A small library of functions useful for integration with opencore.

Contents:

libopencore.auth

  • get_secret(filename)

    Get a shared secret to be used in cookie parsing & construction.

  • generate_cookie_value(username, shared_secret)

    Use this to set a cookie so that opencore will recognize the user as logged in.

  • authenticate_from_cookie(cookie_string, shared_secret)

    Returns (username, hash) for the user identified by the cookie. Throws a BadCookie exception if the cookie is malformed, or a NotAuthenticated exception if the cookie is well-formed but not using the correct shared secret.

Project details


Download files

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

Source Distribution

libopencore-0.1.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

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