Ejemplo n.º 1
0
    def _handle_disco_response(self, context:Context):
        target_issuer = context.request.get('entityID')
        if not target_issuer:
            raise DiscoToTargetIssuerError('no valid entity_id in the disco response')

        target_frontend = context.state.get(self.name, {}).get('target_frontend')
        data_serialized = context.state.get(self.name, {}).get('internal_data', {})
        data = InternalData.from_dict(data_serialized)

        context.target_frontend = target_frontend
        context.decorate(Context.KEY_TARGET_ENTITYID, target_issuer)
        return super().process(context, data)