From 4284800ecbc7b61d5e41d94554e983ae99afb26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Mon, 18 Nov 2019 20:58:11 +0100 Subject: [PATCH] Update AttachRedirectUri to use ValidateAuthorizationRequestContext.IsRejected --- .../OpenIddictServerHandlers.Authentication.cs | 2 +- src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs index 883411da..f8a7373e 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs @@ -1629,7 +1629,7 @@ namespace OpenIddict.Server // Note: at this stage, the validated redirect URI property may be null (e.g if an error // is returned from the ExtractAuthorizationRequest/ValidateAuthorizationRequest events). - if (!string.IsNullOrEmpty(notification?.RedirectUri)) + if (notification != null && !notification.IsRejected) { context.RedirectUri = notification.RedirectUri; } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs index 7db501ef..9ad11f78 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs @@ -528,7 +528,7 @@ namespace OpenIddict.Server // Note: at this stage, the validated redirect URI property may be null (e.g if // an error is returned from the ExtractLogoutRequest/ValidateLogoutRequest events). - if (!string.IsNullOrEmpty(notification?.PostLogoutRedirectUri)) + if (notification != null && !notification.IsRejected) { context.PostLogoutRedirectUri = notification.PostLogoutRedirectUri; }