Spaces:
Sleeping
Sleeping
- __pycache__/app.cpython-311.pyc +0 -0
- app.py +12 -12
__pycache__/app.cpython-311.pyc
ADDED
Binary file (6.09 kB). View file
|
|
app.py
CHANGED
@@ -40,18 +40,18 @@ def oauth_callback(
|
|
40 |
return default_app_user
|
41 |
|
42 |
|
43 |
-
@cl.header_auth_callback
|
44 |
-
def header_auth_callback(headers) -> Optional[cl.AppUser]:
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
|
57 |
@cl.password_auth_callback
|
|
|
40 |
return default_app_user
|
41 |
|
42 |
|
43 |
+
# @cl.header_auth_callback
|
44 |
+
# def header_auth_callback(headers) -> Optional[cl.AppUser]:
|
45 |
+
# # Verify the signature of a token in the header (ex: jwt token)
|
46 |
+
# # or check that the value is matching a row from your database
|
47 |
+
# # print(headers)
|
48 |
+
# if (
|
49 |
+
# headers.get("cookie")
|
50 |
+
# == "ajs_user_id=5011e946-0d0d-5bd4-a293-65742db98d3d; ajs_anonymous_id=67d2569d-3f50-48f3-beaf-b756286276d9"
|
51 |
+
# ):
|
52 |
+
# return cl.AppUser(username="Broomva", role="ADMIN", provider="header")
|
53 |
+
# else:
|
54 |
+
# return None
|
55 |
|
56 |
|
57 |
@cl.password_auth_callback
|