'Add or update the given authroization in the global authorizations list.
Return True if the auth was updated/added and False if no change was
necessary.'

def _add_or_update_auth(self, auth):

    for (index, cur_auth) in enumerate(self.authorizations):
        if (cur_auth['uri'] == auth['uri']):
            if (cur_auth != auth):
                self.authorizations[index] = auth
                return True
            else:
                return False
    self.authorizations.append(auth)
    return True
