Option to disable auth for testing
This commit is contained in:
		
							parent
							
								
									2b89ff7ff9
								
							
						
					
					
						commit
						389092cbb4
					
				| 
						 | 
					@ -21,6 +21,9 @@ def verify_auth_token(token: str) -> str | None:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def require_authentication() -> werkzeug.Response | None:
 | 
					def require_authentication() -> werkzeug.Response | None:
 | 
				
			||||||
    """Require authentication."""
 | 
					    """Require authentication."""
 | 
				
			||||||
 | 
					    if not flask.current_app.config.get("REQUIRE_AUTH"):
 | 
				
			||||||
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    token = flask.request.cookies.get("auth_token")
 | 
					    token = flask.request.cookies.get("auth_token")
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
        None
 | 
					        None
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue