token-generator
A simple python module that can be used by developers to implement user authentication tokens into your program...
code examples
creating a token
import tokengenerator as tg
print(tg.generate_token())
->
ODA4MDMzOTgzNjgyNjg3MDg0.1650034503.uIGFNimx6lPsD8eF7XZzsazEhqfQ9Q
extracting data from a token
import tokengenerator as tg
info = tg.get_token_info("ODA4MDMzOTgzNjgyNjg3MDg0.1650034503.uIGFNimx6lPsD8eF7XZzsazEhqfQ9Q")
print(f"""user ID: {info['id']}
created/last updated: {info['last_updated']}
last random key: {info['last_random_key']}""")
->
user ID: 808033983682687084
created/last updated: Friday, April 15, 2022 03:55:03
last random key: uIGFNimx6lPsD8eF7XZzsazEhqfQ9Q