15 lines
484 B
Python
15 lines
484 B
Python
import psycopg2
|
|
from psycopg2 import sql
|
|
|
|
import dbHandler
|
|
|
|
debug: bool = True
|
|
|
|
def debugPrint(msg: str) -> None:
|
|
if debug:
|
|
print("(TOKEN HANDLER) PRINT: " + msg)
|
|
|
|
def createToken(dbConnection: psycopg2.extensions.connection, userID: int, rememberMe: bool, locationIP: str) -> str:
|
|
debugPrint("Now creating new token with following attributes : userID = " + str(userID) + ", rememberMe = " + str(rememberMe) + ", locationIP = " + locationIP + "...")
|
|
return "sha"
|