Only SSO upon validated tickets
This commit is contained in:
parent
0a3e95ba2b
commit
cf49573c61
@ -41,13 +41,13 @@ class User(models.Model):
|
|||||||
def logout(self, request):
|
def logout(self, request):
|
||||||
async_list = []
|
async_list = []
|
||||||
session = FuturesSession(executor=ThreadPoolExecutor(max_workers=10))
|
session = FuturesSession(executor=ThreadPoolExecutor(max_workers=10))
|
||||||
for ticket in ServiceTicket.objects.filter(user=self):
|
for ticket in ServiceTicket.objects.filter(user=self, validate=True):
|
||||||
async_list.append(ticket.logout(request, session))
|
async_list.append(ticket.logout(request, session))
|
||||||
ticket.delete()
|
ticket.delete()
|
||||||
for ticket in ProxyTicket.objects.filter(user=self):
|
for ticket in ProxyTicket.objects.filter(user=self, validate=True):
|
||||||
async_list.append(ticket.logout(request, session))
|
async_list.append(ticket.logout(request, session))
|
||||||
ticket.delete()
|
ticket.delete()
|
||||||
for ticket in ProxyGrantingTicket.objects.filter(user=self):
|
for ticket in ProxyGrantingTicket.objects.filter(user=self, validate=True):
|
||||||
async_list.append(ticket.logout(request, session))
|
async_list.append(ticket.logout(request, session))
|
||||||
ticket.delete()
|
ticket.delete()
|
||||||
for future in async_list:
|
for future in async_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user