def get(self):
"""
Deletes the 'gateone_user' cookie and handles some other situations for
backwards compatibility.
"""
# Get rid of the cookie no matter what (API auth doesn't use cookies)
user = self.current_user
self.clear_cookie('gateone_user')
check = self.get_argument("check", None)
if check:
# This lets any origin check if the user has been authenticated
# (necessary to prevent "not allowed ..." XHR errors)
self.set_header('Access-Control-Allow-Origin', '*')
logout = self.get_argument("logout", None)
if logout:
self.user_logout(user['upn'])
return
logging.debug('APIAuthHandler: user is NOT authenticated')
self.write('unauthenticated')
self.finish()
评论列表
文章目录