From 153e4b56e6de645ee44e4e7833c32a3890e43c54 Mon Sep 17 00:00:00 2001 From: Tim Siebels Date: Thu, 4 Apr 2024 14:35:24 +0200 Subject: [PATCH] fix: error log when RP responds with status code 204 (#3731) --- consent/strategy_default.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consent/strategy_default.go b/consent/strategy_default.go index 5d8a11d58f7..117fba92548 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -791,8 +791,8 @@ func (s *DefaultStrategy) executeBackChannelLogout(r *http.Request, subject, sid } defer res.Body.Close() - if res.StatusCode != http.StatusOK { - log.WithError(errors.Errorf("expected HTTP status code %d but got %d", http.StatusOK, res.StatusCode)). + if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusNoContent { + log.WithError(errors.Errorf("expected HTTP status code %d or %d but got %d", http.StatusOK, http.StatusNoContent, res.StatusCode)). Error("Unable to execute OpenID Connect Back-Channel Logout Request") return } else {