Spaces:
Sleeping
Sleeping
File size: 289 Bytes
0596440 |
1 2 3 4 5 6 7 8 9 10 11 12 |
from typing import Optional
def isAuthorized(authorization: Optional[str], TOKEN: str) -> bool:
if authorization is None:
return False
if not authorization.startswith("Token "):
return False
token = authorization.split(" ")[1]
return token == TOKEN |