def create_cookie(): content = {"message": "Come to the dark side, we have cookies"} response = JSONResponse(content=content) response.set_cookie(key="fakesession", value="fake-cookie-session-value") return response
def logout(decoded_claims: dict = Depends(APICookieCustom(name="session"))): response = JSONResponse(content={'message': 'deslogado com sucesso'}) auth.revoke_refresh_tokens(decoded_claims['sub']) response.set_cookie('session', expires=0) return response