2018-06-25 08:31:42 -04:00
|
|
|
from django.http import HttpResponse
|
|
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
|
|
from django.views import View
|
|
|
|
|
|
|
|
|
|
|
|
class TokensRevokeView(LoginRequiredMixin, View):
|
|
|
|
def delete(self, request, client_id: str):
|
2018-06-27 18:38:55 -04:00
|
|
|
request.user.token_set.filter(client_id=client_id).delete()
|
2018-06-25 08:31:42 -04:00
|
|
|
return HttpResponse(status=204)
|