def _genauth(sinfo):
  """
  Return authentication parameters for stream, if present.
  """
  user = sinfo['aaf_username'] if 'aaf_username' in sinfo else None
  password = sinfo['aaf_password'] if 'aaf_password' in sinfo else None
  if user and password:
    return { 'auth': (user, password) }
  else:
    return {}