LordXido commited on
Commit
87a201e
·
verified ·
1 Parent(s): f924666

Create codex/auth.py

Browse files
Files changed (1) hide show
  1. codex/auth.py +8 -0
codex/auth.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ AUTHORIZED_USERS = set(os.environ.get("AUTHORIZED_USERS", "").split(","))
4
+
5
+ def verify_user(username):
6
+ if username not in AUTHORIZED_USERS:
7
+ raise PermissionError("Unauthorized user")
8
+ return True