mirror of
https://github.com/fuckpiracyshield/api.git
synced 2024-12-22 18:40:52 +01:00
25 lines
653 B
Python
25 lines
653 B
Python
import sys
|
|
import os
|
|
|
|
current = os.path.dirname(os.path.realpath(__file__))
|
|
parent = os.path.dirname(current)
|
|
sys.path.append(parent)
|
|
|
|
from ioutils.protected import ProtectedHandler
|
|
|
|
from piracyshield_component.exception import ApplicationException
|
|
|
|
class AuthenticationLogoutHandler(ProtectedHandler):
|
|
|
|
"""
|
|
Removes the authentication refresh token.
|
|
The effective logout remains on the access token expiration time, this is why it should be set to a short time.
|
|
"""
|
|
|
|
def get(self):
|
|
if self.initialize_account() == False:
|
|
return
|
|
|
|
self.clear_cookie('refresh_token')
|
|
|
|
self.success(data = 'Goodbye!')
|