| // Copyright 2026 Google LLC | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // https://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // | |
| // Implementation support for ManifestGraph. | |
| #ifndef THIRD_PARTY_CREDENTIO_VALIDATOR_GRAPH_INTERNALS_H_ | |
| #define THIRD_PARTY_CREDENTIO_VALIDATOR_GRAPH_INTERNALS_H_ | |
| #include <utility> | |
| #include "absl/container/flat_hash_set.h" | |
| #include "absl/strings/string_view.h" | |
| #include "proto/assertion.pb.h" | |
| #include "proto/ingredient_assertion.pb.h" | |
| #include "proto/validation_status.pb.h" | |
| namespace credentio { | |
| // Copies any failure statuses from the ingredient assertion to the given | |
| // validation results. It is important to treat these failures (from the claim | |
| // generator that produced the ingredient assertion) as validation failures | |
| // for the ingredient, because (particularly for content binding failures) the | |
| // current validator may not be able to perform the check itself. | |
| void PropagateFailuresFromIngredientAssertion( | |
| const IngredientAssertionV3& assertion, | |
| ValidationStatusSet& ingredient_validation, | |
| absl::flat_hash_set<std::pair<absl::string_view, absl::string_view>>& | |
| existing_failures); | |
| } // namespace credentio | |
| #endif // THIRD_PARTY_CREDENTIO_VALIDATOR_GRAPH_INTERNALS_H_ |