import logging
import os
import tornado.web
+import tornado.websocket
from . import base
if not result == kerberos.AUTH_GSS_COMPLETE:
return self._auth_basic(auth_header)
- # Fetch the server response
- response = kerberos.authGSSServerResponse(context)
+ if not isinstance(self, tornado.websocket.WebSocketHandler):
+ # Fetch the server response
+ response = kerberos.authGSSServerResponse(context)
- # Send the server response
- self.set_header("WWW-Authenticate", "Negotiate %s" % response)
+ # Send the server response
+ self.set_header("WWW-Authenticate", "Negotiate %s" % response)
# Return the user who just authenticated
user = kerberos.authGSSServerUserName(context)