|
|
@@ -1,5 +1,5 @@
|
|
|
from datetime import datetime, timedelta
|
|
|
-from typing import Union
|
|
|
+import sys
|
|
|
from fastapi import Depends, HTTPException
|
|
|
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
|
|
from logging import getLogger
|
|
|
@@ -128,3 +128,7 @@ async def get_current_user(credentials: HTTPAuthorizationCredentials = Depends(s
|
|
|
|
|
|
raise credentials_exception
|
|
|
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ # Test token generation
|
|
|
+ print(generate_token(sys.argv[1]))
|