A Django app to read data from the logged-in user OpenStax account using the SSO cookie.
Project description
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})
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_openstax_accounts-1.2.0.tar.gz.
File metadata
- Download URL: django_openstax_accounts-1.2.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e8951b6bdd38b9695f0181b65fb922d167889ad669d44eaedcfc0a307c0229
|
|
| MD5 |
9309e23f1171de4707ca896a07e0d01c
|
|
| BLAKE2b-256 |
1e9daf991e89f68c82a7451331d96a0fbd5835ea03ddb4b6905feff97b7b5b90
|
Provenance
The following attestation bundles were made for django_openstax_accounts-1.2.0.tar.gz:
Publisher:
publish-to-pypi.yml on openstax/django-openstax-accounts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_openstax_accounts-1.2.0.tar.gz -
Subject digest:
b2e8951b6bdd38b9695f0181b65fb922d167889ad669d44eaedcfc0a307c0229 - Sigstore transparency entry: 1076539899
- Sigstore integration time:
-
Permalink:
openstax/django-openstax-accounts@41ec5a09e5ee62fa3b9482853a0b9432f5ea236b -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/openstax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@41ec5a09e5ee62fa3b9482853a0b9432f5ea236b -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_openstax_accounts-1.2.0-py3-none-any.whl.
File metadata
- Download URL: django_openstax_accounts-1.2.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2f4bb1ea010ba91997baa8acd625a5aa56c84341d15197e0d5a7b534ee1f8f9
|
|
| MD5 |
182f50b39fbfb91fbc9d3ac9970bb2b5
|
|
| BLAKE2b-256 |
28d4ea60fd13cf014f4bad582bbfc1db5280ab113dc8d09fec21c09cf453f886
|
Provenance
The following attestation bundles were made for django_openstax_accounts-1.2.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on openstax/django-openstax-accounts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_openstax_accounts-1.2.0-py3-none-any.whl -
Subject digest:
d2f4bb1ea010ba91997baa8acd625a5aa56c84341d15197e0d5a7b534ee1f8f9 - Sigstore transparency entry: 1076539907
- Sigstore integration time:
-
Permalink:
openstax/django-openstax-accounts@41ec5a09e5ee62fa3b9482853a0b9432f5ea236b -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/openstax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@41ec5a09e5ee62fa3b9482853a0b9432f5ea236b -
Trigger Event:
push
-
Statement type: