M21: add optional organisation identity
This commit is contained in:
@@ -74,9 +74,7 @@ def demo_login(
|
||||
|
||||
|
||||
@router.get("/session", response_model=CurrentUser)
|
||||
def get_session(
|
||||
response: Response, user: CurrentUser = Depends(get_current_user)
|
||||
) -> CurrentUser:
|
||||
def get_session(response: Response, user: CurrentUser = Depends(get_current_user)) -> CurrentUser:
|
||||
# Never let the browser (or an intermediary) cache an authentication check — a stale
|
||||
# cached 200 here would keep showing a logged-out browser as authenticated.
|
||||
response.headers["Cache-Control"] = "no-store"
|
||||
|
||||
Reference in New Issue
Block a user