def set_auth(auth, key=_auth_registry_key, request=None):
 request = (request or webapp2.get_request())
 request.registry[key] = auth

def set_auth ( auth , key = _auth_registry_key , request = None ) : request = ( request or webapp2 . get_request ( ) ) request . registry [ key ] = auth
set the authentication for cherrypy .