• Kevin Morris's avatar
    feat(auth): add requires_{auth,guest} decorators · 51b60f42
    Kevin Morris authored
    
    
    These new decorators are meant to be used without any arguments
    and provide aliases to auth_required:
    - `auth_required(True) -> requires_auth`
    - `auth_required(False) -> requires_guest`
    
    These decorators should be used without arguments, e.g.:
    
        @router.get("/")
        @requires_guest
        async def my_route(request: Request):
            return HTMLResponse()
    
    Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
    51b60f42