@classmethod
def auth_info(cls, server, username, instance_name=None, application_key=
    None, password=None):
    """
            Utility function to retrieve the authenticationInfo for a
            SOAP call. The authInfo allows a short-circuit path to
            authenticate a user and perform the call in one go

            * server
            * username
            * instance name
            * application_key

            returns AuthenticationInfo object with hashed auth_code
        """
    user_key = cls.user_key(username, instance_name)
    if password:
        return {'UserKey': user_key, 'Password': password}
    elif application_key:
        code = cls._auth_code(server, user_key, application_key)
        return {'UserKey': user_key, 'AuthCode': code}
    else:
        return None
