Example #1
0
 def new_session(self):
     session_id = utils.generate_secret()
     self.collection.update({
         '_id': self.id,
     }, {'$push': {
         'sessions': {
             '$each': [session_id],
             '$slice': -settings.app.session_limit,
         },
     }})
     return session_id
Example #2
0
 def generate_secret(self):
     logger.info('Generating auth secret', 'auth')
     self.secret = utils.generate_secret()
Example #3
0
 def generate_token(self):
     logger.info('Generating auth token', 'auth')
     self.token = utils.generate_secret()
Example #4
0
 def generate_secret(self):
     self.secret = utils.generate_secret()
Example #5
0
 def generate_token(self):
     self.token = utils.generate_secret()