'Extract the credentials from the "auth.json" file.
See "https://getcomposer.org/doc/articles/http-basic-authentication.md" for file format.
:param location: Full path to the "auth.json" file
:return: List of credentials founds'

def extract_credentials(self, location):

    creds_found = []
    with open(location) as f:
        creds = json.load(f)
        for cred_type in creds:
            for domain in creds[cred_type]:
                values = {}
                values['AuthenticationType'] = cred_type
                values['Domain'] = domain
                if (cred_type == 'http-basic'):
                    values['Login'] = creds[cred_type][domain]['username']
                    values['Password'] = creds[cred_type][domain]['password']
                else:
                    values['Password'] = creds[cred_type][domain]
                creds_found.append(values)
    return creds_found
