master #459
@ -25,9 +25,12 @@ class LogoutView(View):
|
|||||||
A redirect
|
A redirect
|
||||||
"""
|
"""
|
||||||
user = request.user
|
user = request.user
|
||||||
oauth_token = user.oauth_token
|
try:
|
||||||
if oauth_token:
|
oauth_token = user.oauth_token
|
||||||
oauth_token.revoke()
|
if oauth_token:
|
||||||
|
oauth_token.revoke()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
logout(request)
|
logout(request)
|
||||||
return redirect(SSO_SERVER_BASE)
|
return redirect(SSO_SERVER_BASE)
|
||||||
|
Loading…
Reference in New Issue
Block a user