'Clear the auth info and enable basic auth.'

def set_basic(self, realm='authentication    required'):

    dict.clear(self)
    dict.update(self, {'__auth_type__': 'basic', 'realm': realm})
    if self.on_update:
        self.on_update(self)
