Commits

David Larlet committed e2acef3

Allows consumer key & secret to be zero length (null=True, blank=True) - this is fine according to the OAuth spec, see
http://groups.google.com/group/oauth/browse_thread/thread/15c5efb10d0a3813 for details, thanks Toby White

  • Participants
  • Parent commits c7686a6

Comments (0)

Files changed (1)

oauth_provider/models.py

     ACCESS = 2
     TOKEN_TYPES = ((REQUEST, u'Request'), (ACCESS, u'Access'))
     
-    key = models.CharField(max_length=KEY_SIZE)
-    secret = models.CharField(max_length=SECRET_SIZE)
+    key = models.CharField(max_length=KEY_SIZE, null=True, blank=True)
+    secret = models.CharField(max_length=SECRET_SIZE, null=True, blank=True)
     token_type = models.SmallIntegerField(choices=TOKEN_TYPES)
     timestamp = models.IntegerField(default=long(time()))
     is_approved = models.BooleanField(default=False)