'Build auth dictionary.
It will create an auth dictionary based on all the arguments
that it receives.'

def build_authentication_request(self, token=None, user_id=None, username=None, user_domain_id=None, user_domain_name=None, password=None, kerberos=False, passcode=None, **kwargs):

    auth_data = {}
    auth_data['identity'] = {'methods': []}
    if kerberos:
        auth_data['identity']['methods'].append('kerberos')
        auth_data['identity']['kerberos'] = {}
    if token:
        auth_data['identity']['methods'].append('token')
        auth_data['identity']['token'] = self._build_token_auth(token)
    if (password and (user_id or username)):
        auth_data['identity']['methods'].append('password')
        auth_data['identity']['password'] = self._build_auth(user_id, username, user_domain_id, user_domain_name, password=password)
    if (passcode and (user_id or username)):
        auth_data['identity']['methods'].append('totp')
        auth_data['identity']['totp'] = self._build_auth(user_id, username, user_domain_id, user_domain_name, passcode=passcode)
    if kwargs:
        auth_data['scope'] = self._build_auth_scope(**kwargs)
    return {'auth': auth_data}
