def _verify_sector_identifier(self, request):
        """
        Verify `sector_identifier_uri` is reachable and that it contains 
        `redirect_uri`s.

        :param request: Provider registration request
        :return: si_redirects, sector_id
        :raises: InvalidSectorIdentifier
        """
        si_url = request["sector_identifier_uri"]
        try:
            res = self.endpoint_context.httpc.get(si_url)
        except Exception as err:
            logger.error(err)
            res = None

        if not res:
            raise InvalidSectorIdentifier("Couldn't read from sector_identifier_uri")

        logger.debug("sector_identifier_uri => %s", sanitize(res.text))

        try:
            si_redirects = json.loads(res.text)
        except ValueError:
            raise InvalidSectorIdentifier(
                "Error deserializing sector_identifier_uri content")

        if "redirect_uris" in request:
            logger.debug("redirect_uris: %s", request["redirect_uris"])
            for uri in request["redirect_uris"]:
                if uri not in si_redirects:
                    raise InvalidSectorIdentifier(
                        "redirect_uri missing from sector_identifiers")

        return si_redirects, si_url
def _verify_sector_identifier ( self , request ) : si_url = request [ "sector_identifier_uri" ] try : res = self . endpoint_context . httpc . get ( si_url ) except Exception as err : logger . error ( err ) res = None if not res : raise InvalidSectorIdentifier ( "Couldn't read from sector_identifier_uri" ) logger . debug ( "sector_identifier_uri => %s" , sanitize ( res . text ) ) try : si_redirects = json . loads ( res . text ) except ValueError : raise InvalidSectorIdentifier ( "Error deserializing sector_identifier_uri content" ) if "redirect_uris" in request : logger . debug ( "redirect_uris: %s" , request [ "redirect_uris" ] ) for uri in request [ "redirect_uris" ] : if uri not in si_redirects : raise InvalidSectorIdentifier ( "redirect_uri missing from sector_identifiers" ) return si_redirects , si_url
Verify `sector_identifier_uri` is reachable and that it contains 
        `redirect_uri`s.

        :param request: Provider registration request
        :return: si_redirects, sector_id
        :raises: InvalidSectorIdentifier