https://github.com/vb64/gae-openid
python/django library for authorization with Wargaming OpenID
https://github.com/vb64/gae-openid
Last synced: about 1 year ago
JSON representation
python/django library for authorization with Wargaming OpenID
- Host: GitHub
- URL: https://github.com/vb64/gae-openid
- Owner: vb64
- License: mit
- Created: 2014-09-22T10:26:49.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-05-24T12:02:02.000Z (about 10 years ago)
- Last Synced: 2025-02-03T15:55:32.321Z (over 1 year ago)
- Language: Python
- Size: 132 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GAE-OpenID
==========
[Live version](http://openid-gae.appspot.com) of this code.
Django library for authorization with Wargaming OpenID on Google App Engine platform.
based on:
[demand.openid.net](https://code.google.com/p/demand/) included as zip archive.
[google-app-engine-django-openid](https://code.google.com/p/google-app-engine-django-openid/)
Main difference from google-app-engine-django-openid is a using GAE memcache for saving openid session data, instead GAE datastore tables. So don't need db tables for this purpose, and their periodically cleanup.
**Usage in your Django App**
**1.** Define handler for success OpenID auth as:
```
def success_handler(request, response, openid_url)
```
where request, response are the standard django objects, and openid_url is a auth data from wargaming.
**2.** Include library urls handlers and your function from step 1 into your url.py.
For example:
```
urlpatterns = patterns('',
...
url(r'^openid/', include('gae-openid.urls'), {'success_handler': module.success_handler}),
...
)
```
**3.** Add library middleware module into your settings.py:
```
MIDDLEWARE_CLASSES = (
...
'gae-openid.middleware.OpenIDMiddleware',
...
)
```
Into templates, for entry point to wargaming OpenID auth, you can use, for example:
```
{% url openid_start %}?continue=/&openid_identifier=https://ru.wargaming.net/id/
```