Ejemplo n.º 1
0
 def readToken(self):
     cursor = self.connection.cursor()
     cursor.execute("SELECT * FROM token")
     result = cursor.fetchone()
     cursor.close()
     if result == None:
         return None
     return Token.createFromDDIC(result)
Ejemplo n.º 2
0
 def storeToken(self, response, database):
     print("Updating authorization token in the database.")
     token = Token.createFromDDIC(response.json())
     database.storeToken(token)
     return token