c5a9a1b Allow `auth.get_user()` method to be called multiple times.

Authored and Committed by jkaluza 5 years ago
    Allow `auth.get_user()` method to be called multiple times.
    
    The `ImportModuleAPI` calls the `auth.get_user()` which auths the
    user using Kerberos. the `ImportModuleAPI` later calls `SCMHandler`
    which in its `__init__` method calls the `auth.get_user()` again.
    This leads to traceback in GSSAPI, because the user is already
    authed.
    
    This commit fixes this by caching the auth results in `flask.g`,
    which is reset after each request based on the Note in
    http://flask.pocoo.org/docs/1.0/appcontext/#storing-data.
    
    This commit also marks mutual auth as OPTIONAL in `mbs-cli`,
    because MBS server currently does not do mutual auth.
    
        
file modified
+4 -2
file modified
+8 -6
file modified
+20 -6