code: def salt_token_tool():
      '''
      If the custom authentication header is supplied, put it in the cookie dict
      so the rest of the session-based auth works as intended
      '''
      x_auth = cherrypy.request.headers.get('X-Auth-Token', None)
  
      # X-Auth-Token header trumps session cookie
      if x_auth:
          cherrypy.request.cookie['session_id'] = x_autf salt_token_tool():
      '''
      If the custom authentication header is supplied, put it in the cookie dict
      so the rest of the session-based auth works as intended
      '''
      x_auth = cherrypy.request.headers.get('X-Auth-Token', None)
  
      # X-Auth-Token header trumps session cookie
      if x_auth:
          cherrypy.request.cookie['session_id'] = x_auth
docs: If the custom authentication header is supplied, put it in the cookie dict
      so the rest of the session-based auth works as intended