def get_requester():
 auth_context = pecan.request.context.get('auth', None)
 user_db = (auth_context.get('user', None) if auth_context else None)
 if (not user_db):
  LOG.warn('auth is disabled, falling back to system_user')
  username = cfg.CONF.system_user.user
 else:
  username = user_db.name
 return username

def get_requester ( ) : auth_context = pecan . request . context . get ( 'auth' , None ) user_db = ( auth_context . get ( 'user' , None ) if auth_context else None ) if ( not user_db ) : LOG . warn ( 'auth is disabled, falling back to system_user' ) username = cfg . CONF . system_user . user else : username = user_db . name return username
retrieve username of the authed user :rtype: str .