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> <PropertyGroup>
<AspNetCoreVersion>1.0.0</AspNetCoreVersion> <AspNetCoreVersion>1.0.0</AspNetCoreVersion>
<AspNetContribOpenIdExtensionsVersion>1.0.0-beta1-final</AspNetContribOpenIdExtensionsVersion> <AspNetContribOpenIdExtensionsVersion>1.0.0-rtm-*</AspNetContribOpenIdExtensionsVersion>
<AspNetContribOpenIdServerVersion>1.0.0-rc1-final</AspNetContribOpenIdServerVersion> <AspNetContribOpenIdServerVersion>1.0.0-rtm-*</AspNetContribOpenIdServerVersion>
<CryptoHelperVersion>2.0.0</CryptoHelperVersion> <CryptoHelperVersion>2.0.0</CryptoHelperVersion>
<JetBrainsVersion>10.3.0</JetBrainsVersion> <JetBrainsVersion>10.3.0</JetBrainsVersion>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion> <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>

4
src/OpenIddict/OpenIddictProvider.Authentication.cs

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

Loading…
Cancel
Save