Browse Source

Update AttachRedirectUri to use ValidateAuthorizationRequestContext.IsRejected

pull/844/head
Kévin Chalet 7 years ago
parent
commit
4284800ecb
  1. 2
      src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs
  2. 2
      src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs

2
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 // Note: at this stage, the validated redirect URI property may be null (e.g if an error
// is returned from the ExtractAuthorizationRequest/ValidateAuthorizationRequest events). // is returned from the ExtractAuthorizationRequest/ValidateAuthorizationRequest events).
if (!string.IsNullOrEmpty(notification?.RedirectUri)) if (notification != null && !notification.IsRejected)
{ {
context.RedirectUri = notification.RedirectUri; context.RedirectUri = notification.RedirectUri;
} }

2
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 // Note: at this stage, the validated redirect URI property may be null (e.g if
// an error is returned from the ExtractLogoutRequest/ValidateLogoutRequest events). // an error is returned from the ExtractLogoutRequest/ValidateLogoutRequest events).
if (!string.IsNullOrEmpty(notification?.PostLogoutRedirectUri)) if (notification != null && !notification.IsRejected)
{ {
context.PostLogoutRedirectUri = notification.PostLogoutRedirectUri; context.PostLogoutRedirectUri = notification.PostLogoutRedirectUri;
} }

Loading…
Cancel
Save