@@ -0,0 +1,651 @@
+from itsdangerous import TimedJSONWebSignatureSerializer as Serializer, SignatureExpired, BadTimeSignature%0A%0Aimport os%0A%0Adef gen_auth_token(id,expiration=10000):%0A    %22%22%22Generate auth token%22%22%22%0A    s = Serializer(os.environ%5B'API_KEY'%5D,expires_in=expiration)%0A    return s.dumps(%7B'id':id%7D)%0A%0Adef verify_auth_token(token):%0A    %22%22%22Verify auth token%22%22%22%0A    s = Serializer(os.environ%5B'API_KEY'%5D)%0A    %0A    # check the token and throw respective%0A    try:%0A        user = s.loads()%0A    except SignatureExpired:%0A        return False, %22SignatureExpired bad token%22%0A    except BadTimeSignature:%0A        return False, %22BadSignature bad token%22%0A    return True, user%0A%0A%0A    

Create util file for gen and verifying auth tokens