django-steamauth
make steam openid authorization easily
Dependency
- requests
- Django >= 1.7
Install
Python >= 3
pip install django-steamauth
Python 2.x
pip install django-steamauth==1.1.1
Usage
You should set ABSOLUTE_URL in settings.py for redirection after login. default is localhost
# settings.py
ABSOLUTE_URL='127.0.0.1:8000'
# or
ABSOLUTE_URL='yourowndomain.com'
You can retrive user id with get_uid method when a login is successful.
# views.py
from django.shortcuts import redirect
from steamauth import auth, get_uid
# GET /login
def login(request):
# if your service does not support ssl, set use_ssl parameters value to False
# return auth('/callback', use_ssl=False)
return auth('/callback')
# GET /process
def login_callback(request):
steam_uid = get_uid(request.GET)
if steam_uid is None:
# login failed
return redirect('/login_failed')
else:
# login success
# do something with variable `steam_uid`
return redirect('/')
Changelog
1.1.2
- Dropping Python 2 Support
- Remove deprecated interfaces:
RedirectToSteamSignIn,GetSteamID64 - Change the default value of
ABSOLUTE_URLfromlocalhosttolocalhost:8000 - Fix an issue
use_sslparameter ofauthdidn't work (#6) - Set default value of
use_ssltoTrue
Metadata
Release files for django-steamauth 1.1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_steamauth-1.1.2.3-py3-none-any.whl | Python 3 | none | any | Details for django_steamauth-1.1.2.3-py3-none-any.whl |
Release files / django_steamauth-1.1.2.3-py3-none-any.whl
| Download URL | django_steamauth-1.1.2.3-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d57e838f759fd3d66412a34bd8224eadae0e804c36587896781f57a025160f08
|
|
BLAKE2b-256 checksum How to use checksums |
2599ae8d1b0cca3692de902ff28f438bdf34e7f1ad82154671c3151be2420bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0
|
Security for django-steamauth 1.1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.