def salt_token_tool():
 x_auth = cherrypy.request.headers.get('X-Auth-Token', None)
 if x_auth:
  cherrypy.request.cookie['session_id'] = x_auth

def salt_token_tool ( ) : x_auth = cherrypy . request . headers . get ( 'X-Auth-Token' , None ) if x_auth : cherrypy . request . cookie [ 'session_id' ] = x_auth
if the custom authentication header is supplied .