Reusable Django app for Penn Labs accounts
Project description
Requirements
Python 3.4+
Django 2.0+
Installation
- Install with pipenv
pipenv install django-labs-accounts
Add accounts to INSTALLED_APPS
INSTALLED_APPS = (
...
'accounts.apps.AccountsConfig',
)
Add the following to urls.py
urlpatterns = [
...
path('accounts/', include('accounts.urls', namespace='accounts'))
]
Documentation
All settings are handled with a PLATFORM_ACCOUNTS dictionary.
Example:
PLATFORM_ACCOUNTS = {
'CLIENT_ID': 'id',
'CLIENT_SECRET': 'secret',
'REDIRECT_URI': 'example',
}
The available settings are:
CLIENT_ID the client ID to connect to platform with. Defaults to LABS_CLIENT_ID environment variable.
CLIENT_SECRET the client secret to connect to platform with. Defaults to LABS_CLIENT_SECRET environment variable.
REDIRECT_URI the redirect uri to send to platform. Defaults to LABS_REDIRECT_URI environment variable.
SCOPE the scope for this applications tokens. Must include introspection. Defaults to ['read', 'introspection'].
PLATFORM_URL URL of platform server to connect to. Should be https://platform(-dev).pennlabs.org (no trailing slash)
Changelog
See CHANGELOG.md.
License
Licensed See LICENSE.md.
Project details
Release history Release notifications | RSS feed
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
Hashes for django-labs-accounts-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0456bd5ab600ae7e4684e1b58b6c2f0af209309b3a1bb86f67010d94abae8f2 |
|
MD5 | d7f9f2b88414a9859a6ff060c8781282 |
|
BLAKE2b-256 | b211d1322fe56629bbd33fb6f8d2b1aebe3204a9c83f1dd3dac4e40e206e2460 |
Hashes for django_labs_accounts-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c271fc4f2cb10c3dbc00a7eb4dae020732fb5335b95177b89895f0d17f1d4e |
|
MD5 | 4029fb6f79988cc02230c22985c37e66 |
|
BLAKE2b-256 | bb1470a60391400393066cadd1b00d29659c0c02e37085b0e4e2a0f9cb328d2f |