Esempio n. 1
0
 def __call__(self, environ, start_response):
     user = os.environ.get('AUTHENTICATE_UID', None)
     if user is not None:
         environ['USER'] = user
     else:
         if config.get('API_TRUST_IDENT', 0) == 1:
             user = environ.pop('HTTP_X_REMOTE_IDENT', None)
             if user not in ("", "unknown", "(null)"):
                 environ['USER'] = user
     return self.app(environ, start_response)
Esempio n. 2
0
 def callback():
     return config.get(value)