Commits

Anonymous committed 12780c1

useless now.

Comments (0)

Files changed (1)

django_authopenid/models.py

 
 
 
-__all__ = ['Nonce', 'Association', 'UserAssociation', 
-        'UserPasswordQueueManager', 'UserPasswordQueue']
-
 class Nonce(models.Model):
     """ openid nonce """
     server_url = models.CharField(max_length=255)
     
     def __unicode__(self):
         return "Openid %s with user %s" % (self.openid_url, self.user)
-
-class UserPasswordQueueManager(models.Manager):
-    """ manager for UserPasswordQueue object """
-    def get_new_confirm_key(self):
-        "Returns key that isn't being used."
-        # The random module is seeded when this Apache child is created.
-        # Use SECRET_KEY as added salt.
-        while 1:
-            confirm_key = md5.new("%s%s%s%s" % (
-                random.randint(0, sys.maxint - 1), os.getpid(),
-                time.time(), settings.SECRET_KEY)).hexdigest()
-            try:
-                self.get(confirm_key=confirm_key)
-            except self.model.DoesNotExist:
-                break
-        return confirm_key
-
-
-class UserPasswordQueue(models.Model):
-    """
-    model for new password queue.
-    """
-    user = models.ForeignKey(User, unique=True)
-    new_password = models.CharField(max_length=30)
-    confirm_key = models.CharField(max_length=40)
-
-    objects = UserPasswordQueueManager()
-
-    def __unicode__(self):
-        return self.user.username