Commits

David Larlet committed ada165f

Recent switch to uuid generate keys of 32 chars (vs. 16 before), default KEY_SIZE switched to 32, you'll need to alter your table if you update your existing code. Tests switched to postgresql because sqlite doesn't verify fields' constraints...

Comments (0)

Files changed (2)

examples/provider/settings.py

 
 TEMPLATE_DEBUG = DEBUG = True
 MANAGERS = ADMINS = ()
-DATABASE_ENGINE = 'sqlite3'
-DATABASE_NAME = os.path.join(ROOT_PATH, 'testdb.sqlite')
+#DATABASE_ENGINE = 'sqlite3'
+#DATABASE_NAME = os.path.join(ROOT_PATH, 'testdb.sqlite')
+DATABASE_ENGINE = 'postgresql_psycopg2'
+DATABASE_NAME = 'oauthprovider'
 
 TIME_ZONE = 'America/Chicago'
 LANGUAGE_CODE = 'en-us'

oauth_provider/consts.py

 from django.utils.translation import ugettext_lazy as _
 from django.conf import settings
 
-KEY_SIZE = getattr(settings, 'OAUTH_PROVIDER_KEY_SIZE', 16)
+KEY_SIZE = getattr(settings, 'OAUTH_PROVIDER_KEY_SIZE', 32)
 SECRET_SIZE = getattr(settings, 'OAUTH_PROVIDER_SECRET_SIZE', 16)
 VERIFIER_SIZE = getattr(settings, 'OAUTH_PROVIDER_VERIFIER_SIZE', 10)
 CONSUMER_KEY_SIZE = getattr(settings, 'OAUTH_PROVIDER_CONSUMER_KEY_SIZE', 256)