david / django-oauth (http://oauth.net/)

Support of OAuth in Django.

Clone this repository (size: 114.5 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-oauth
commit 28: 8579a1562b16
parent 27: c038f3e47c5f
branch: default
Update models (stolen from piston) to be 1.0a ready, note that it will affect your Token/Consumer tables
David Larlet / david
10 months ago
r28:8579a1562b16 18 loc 329 bytes embed / history / annotate / raw /
from django.utils.translation import ugettext_lazy as _

KEY_SIZE = 16
SECRET_SIZE = 16
VERIFIER_SIZE = 10
CONSUMER_KEY_SIZE = 256

PENDING = 1
ACCEPTED = 2
CANCELED = 3
REJECTED = 4

CONSUMER_STATES = (
    (PENDING,  _('Pending')),
    (ACCEPTED, _('Accepted')),
    (CANCELED, _('Canceled')),
    (REJECTED, _('Rejected')),
)