add method delete
This commit is contained in:
parent
0d00df8194
commit
6e7970d5e3
@ -35,3 +35,10 @@ async def check_token(current_user: Annotated[users.User, Depends(users_token.ge
|
||||
content = {"message": "Check token"}
|
||||
response = JSONResponse(content=content)
|
||||
return response
|
||||
|
||||
@router.delete("/token",tags=["token"])
|
||||
async def check_token(current_user: Annotated[users.User, Depends(users_token.get_current_active_user)], authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin", "User"]))]):
|
||||
content = {"message": "Token deleted"}
|
||||
response = JSONResponse(content=content)
|
||||
response.set_cookie(key="access_token", value="", httponly=True)
|
||||
return response
|
Loading…
x
Reference in New Issue
Block a user