Commits

Thomas Johansson  committed 7908537

Fix up some documentation, remove an unused helper function and use VERIFIER_SIZE appropriately.

  • Participants
  • Parent commits 31464ea

Comments (0)

Files changed (2)

File piston/authentication/oauth/store/__init__.py

         or raise `InvalidConsumer`.
         
         `request`: The Django request object.
+        `oauth_request`: The `oauth2.Request` object.
         `consumer_key`: The consumer key.
         """
         raise NotImplementedError

File piston/authentication/oauth/store/db.py

 import oauth2 as oauth
 
 from piston.authentication.oauth.store import InvalidAccessToken, InvalidConsumer, InvalidRequestToken, Store
-from piston.authentication.oauth.utils import generate_random
-from piston.models import Nonce, Token, Consumer
+from piston.models import Nonce, Token, Consumer, VERIFIER_SIZE
 
 
 class ModelStore(Store):    
             token = Token.objects.get(key=request_token.key, token_type=Token.REQUEST)
             token.is_approved = True
             token.user = request.user
-            token.verifier = oauth.generate_verifier()
+            token.verifier = oauth.generate_verifier(VERIFIER_SIZE)
             token.save()
             return token
         except Token.DoesNotExist: