Broomva commited on
Commit
565ec0d
·
1 Parent(s): b8d1c52
Files changed (2) hide show
  1. __pycache__/app.cpython-311.pyc +0 -0
  2. 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
- # 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
 
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