Ejemplo n.º 1
0
 def get_auth_token(self):
     """Get token that can be used to authenticate a user."""
     return token.generate(self.id, 'users')
Ejemplo n.º 2
0
 def get_token(self):
     return token.generate(self.mail.data, namespace='preterm')