Skip to main content

Steam api and authentication for django.

Project description

# django-steam

Steam api and authentication for django

## Installation

```
pip install django_steam
```

## Configuration

First install the required apps and set the required settings :
```
INSTALLED_APPS = (
...
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django_openid_auth',
'django_steam_api',
'django_steam',
...
)


AUTHENTICATION_BACKENDS = (
...
'django_openid_auth.auth.OpenIDBackend',
...
)

LOGIN_URL = '/path/to/openid/login/'
OPENID_CREATE_USERS = True
STEAM_API_KEY = 'YOURSTEAMAPIKEY'

# recommended
OPENID_SSO_SERVER_URL = 'http://steamcommunity.com/openid'
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'


# optional
OPENID_UPDATE_DETAILS_FROM_SREG = True
ALLOWED_EXTERNAL_OPENID_REDIRECT_DOMAINS = ['http://example.org']
OPENID_STRICT_USERNAMES = False
# see https://github.com/edx/django-openid-auth
# and https://github.com/voblivion/django-steam-api
```

Add openid urls to your configuration :
```
urlpatterns = patterns('',
...
(r'^openid/', include('django_openid_auth.urls')),
...
)
```


Then update database scheme :
```
./manage.py migrate
```

## Usage

Use any of django-steam-api models.

Give your users link to steam auth :
```
<a href="/openid/login">
<img src="https://steamcommunity-a.akamaihd.net/public/images/signinthroughsteam/sits_01.png" width="180" height="35" border="0">
</a>
```

Access steam's player profile of authenticated users :
```
if user.steam:
do_something_with(user.steam.player)
```

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

django-steam-0.1.tar.gz (15.5 kB view details)

Uploaded Source

File details

Details for the file django-steam-0.1.tar.gz.

File metadata

  • Download URL: django-steam-0.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-steam-0.1.tar.gz
Algorithm Hash digest
SHA256 82d91b16d865002a630b0a852dd919bc9600a33f9a46e501db0c2519e05ee7cc
MD5 419492d4f3e2f3b65b57f9125c5a4bcc
BLAKE2b-256 639f188032dad63527069f50ca5edcc4b579c0a5c39092321e2ce1f6825f1a60

See more details on using hashes here.

Supported by

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