Socket
Book a DemoInstallSign in
Socket

django-openstax-accounts

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-openstax-accounts

A Django app to read data from the logged-in user OpenStax account using the SSO cookie.

pipPyPI
Version
1.0
Maintainers
1

======================== django-openstax-accounts

django-openstax-accounts is a Django app to read data from the logged-in user's OpenStax account using the SSO cookie.

Quick start

Add the following settings to your settings file::

# OpenStax Accounts settings
SSO_COOKIE_NAME = "<oxa_env>"
SSO_SIGNATURE_PUBLIC_KEY = "<public_key_for_accounts>"
SSO_ENCRYPTION_PRIVATE_KEY = "<private_key_for_accounts>"

Usage

If you need to access the current user's OpenStax account UUID, you can use the get_logged_in_user_uuid function from openstax_accounts.functions. This function will a UUID.::

from django.shortcuts import render
from openstax_accounts.functions import get_logged_in_user_uuid

def my_view(request):
    user_uuid = get_logged_in_user_uuid(request)
    # function to do something with the uuid, like save it to your database or use for an API call
    return render(request, "my_template.html", {"user_uuid": user_uuid})

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.