def add_metadata(self, _environ, identity):
        #logger = environ.get('repoze.who.logger','')

        key = identity.get('repoze.who.userid')
        try:
            if self.key_attribute:
                for sec in self.users.sections():
                    if self.users.has_option(sec, self.key_attribute):
                        if key in self.users.get(sec, self.key_attribute):
                            identity["user"] = dict(self.users.items(sec))
                            break
            else:
                identity["user"] = dict(self.users.items(key))
        except __HOLE__:
            pass
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/s2repoze/plugins/ini.py/INIMetadataProvider.add_metadata