Browse Source

Migrate to the latest ASOS RTM nightly builds

pull/384/head
Kévin Chalet 9 years ago
parent
commit
f44cf04f28
  1. 4
      build/dependencies.props
  2. 4
      src/OpenIddict/OpenIddictProvider.Authentication.cs
  3. 38
      src/OpenIddict/OpenIddictProvider.Session.cs

4
build/dependencies.props

@ -2,8 +2,8 @@
<PropertyGroup>
<AspNetCoreVersion>1.0.0</AspNetCoreVersion>
<AspNetContribOpenIdExtensionsVersion>1.0.0-beta1-final</AspNetContribOpenIdExtensionsVersion>
<AspNetContribOpenIdServerVersion>1.0.0-rc1-final</AspNetContribOpenIdServerVersion>
<AspNetContribOpenIdExtensionsVersion>1.0.0-rtm-*</AspNetContribOpenIdExtensionsVersion>
<AspNetContribOpenIdServerVersion>1.0.0-rtm-*</AspNetContribOpenIdServerVersion>
<CryptoHelperVersion>2.0.0</CryptoHelperVersion>
<JetBrainsVersion>10.3.0</JetBrainsVersion>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>

4
src/OpenIddict/OpenIddictProvider.Authentication.cs

@ -383,8 +383,8 @@ namespace OpenIddict
await options.Value.Cache.RemoveAsync(key);
}
if (!options.Value.ApplicationCanDisplayErrors && !string.IsNullOrEmpty(context.Response.Error) &&
string.IsNullOrEmpty(context.Response.RedirectUri))
if (!options.Value.ApplicationCanDisplayErrors && !string.IsNullOrEmpty(context.Error) &&
string.IsNullOrEmpty(context.RedirectUri))
{
// Determine if the status code pages middleware has been enabled for this request.
// If it was not registered or enabled, let the OpenID Connect server middleware render

38
src/OpenIddict/OpenIddictProvider.Session.cs

@ -87,30 +87,22 @@ namespace OpenIddict
var applications = context.HttpContext.RequestServices.GetRequiredService<OpenIddictApplicationManager<TApplication>>();
var logger = context.HttpContext.RequestServices.GetRequiredService<ILogger<OpenIddictProvider<TApplication, TAuthorization, TScope, TToken>>>();
// Skip validation if the optional post_logout_redirect_uri
// parameter was missing from the logout request.
if (string.IsNullOrEmpty(context.PostLogoutRedirectUri))
// If an optional post_logout_redirect_uri was provided, validate it.
if (!string.IsNullOrEmpty(context.PostLogoutRedirectUri))
{
logger.LogInformation("The logout request validation process was skipped because " +
"the post_logout_redirect_uri parameter was missing.");
context.Skip();
return;
}
var application = await applications.FindByLogoutRedirectUri(context.PostLogoutRedirectUri, context.HttpContext.RequestAborted);
if (application == null)
{
logger.LogError("The logout request was rejected because the client application corresponding " +
"to the specified post_logout_redirect_uri was not found in the database: " +
"'{PostLogoutRedirectUri}'.", context.PostLogoutRedirectUri);
var application = await applications.FindByLogoutRedirectUri(context.PostLogoutRedirectUri, context.HttpContext.RequestAborted);
if (application == null)
{
logger.LogError("The logout request was rejected because the client application corresponding " +
"to the specified post_logout_redirect_uri was not found in the database: " +
"'{PostLogoutRedirectUri}'.", context.PostLogoutRedirectUri);
context.Reject(
error: OpenIdConnectConstants.Errors.InvalidClient,
description: "Invalid post_logout_redirect_uri.");
context.Reject(
error: OpenIdConnectConstants.Errors.InvalidClient,
description: "Invalid post_logout_redirect_uri.");
return;
return;
}
}
context.Validate();
@ -182,8 +174,8 @@ namespace OpenIddict
await options.Value.Cache.RemoveAsync(key);
}
if (!options.Value.ApplicationCanDisplayErrors && !string.IsNullOrEmpty(context.Response.Error) &&
string.IsNullOrEmpty(context.Response.PostLogoutRedirectUri))
if (!options.Value.ApplicationCanDisplayErrors && !string.IsNullOrEmpty(context.Error) &&
string.IsNullOrEmpty(context.PostLogoutRedirectUri))
{
// Determine if the status code pages middleware has been enabled for this request.
// If it was not registered or enabled, let the OpenID Connect server middleware render

Loading…
Cancel
Save