Skip to content

Commit e9da597

Browse files
authored
Merge branch 'main' into feature/powermeter_doc
2 parents f111445 + be31e96 commit e9da597

10 files changed

+1450
-6
lines changed

modules/Auth/Auth.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,17 @@ void Auth::ready() {
7373
this->auth_handler->register_validate_token_callback([this](const ProvidedIdToken& provided_token) {
7474
std::vector<ValidationResult> validation_results;
7575
for (const auto& token_validator : this->r_token_validator) {
76-
validation_results.push_back(token_validator->call_validate_token(provided_token));
76+
try {
77+
const auto result = token_validator->call_validate_token(provided_token);
78+
validation_results.push_back(result);
79+
// TODO: This is very broad catch, make it more narrow when the everest-framework error handling will be
80+
// established
81+
} catch (const std::exception& e) {
82+
EVLOG_warning << "Exception during validating token: " << e.what();
83+
ValidationResult validation_result;
84+
validation_result.authorization_status = AuthorizationStatus::Unknown;
85+
validation_results.push_back(validation_result);
86+
}
7787
}
7888
return validation_results;
7989
});

modules/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 122 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)