forked from 00dani/lemoncurry
9 lines
332 B
Python
9 lines
332 B
Python
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):
|
|
request.user.token_set.filter(client_id=client_id).delete()
|
|
return HttpResponse(status=204)
|