Skip to content

Commit ed3250e

Browse files
Bump OpenIddict to 6.1.1 (OrchardCMS#17582)
Co-Authored-By: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 5f3b16e commit ed3250e

File tree

7 files changed

+15
-30
lines changed

7 files changed

+15
-30
lines changed

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
<PackageVersion Include="NJsonSchema" Version="11.0.2" />
5959
<PackageVersion Include="NLog.Web.AspNetCore" Version="5.3.14" />
6060
<PackageVersion Include="NodaTime" Version="3.2.0" />
61-
<PackageVersion Include="OpenIddict.Core" Version="6.0.0" />
62-
<PackageVersion Include="OpenIddict.Server.AspNetCore" Version="6.0.0" />
63-
<PackageVersion Include="OpenIddict.Server.DataProtection" Version="6.0.0" />
64-
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="6.0.0" />
65-
<PackageVersion Include="OpenIddict.Validation.DataProtection" Version="6.0.0" />
66-
<PackageVersion Include="OpenIddict.Validation.SystemNetHttp" Version="6.0.0" />
61+
<PackageVersion Include="OpenIddict.Core" Version="6.1.1" />
62+
<PackageVersion Include="OpenIddict.Server.AspNetCore" Version="6.1.1" />
63+
<PackageVersion Include="OpenIddict.Server.DataProtection" Version="6.1.1" />
64+
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="6.1.1" />
65+
<PackageVersion Include="OpenIddict.Validation.DataProtection" Version="6.1.1" />
66+
<PackageVersion Include="OpenIddict.Validation.SystemNetHttp" Version="6.1.1" />
6767
<PackageVersion Include="OrchardCore.Translations.All" Version="2.1.0" />
6868
<PackageVersion Include="PdfPig" Version="0.1.9" />
6969
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.3" />

src/OrchardCore.Modules/OrchardCore.OpenId/Configuration/OpenIdServerConfiguration.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ public void Configure(OpenIddictServerOptions options)
178178
options.Scopes.Add(Scopes.Phone);
179179
options.Scopes.Add(Scopes.Profile);
180180
options.Scopes.Add(Scopes.Roles);
181+
182+
// Note: caching is enabled for both authorization and end session requests to allow sending
183+
// large POST authorization and end session requests, but can be programmatically disabled, as the
184+
// authorization and end session views support flowing the entire payload and not just the request_uri.
185+
options.EnableAuthorizationRequestCaching = true;
186+
options.EnableEndSessionRequestCaching = true;
181187
}
182188

183189
public void Configure(OpenIddictServerDataProtectionOptions options)
@@ -202,12 +208,6 @@ public void Configure(string name, OpenIddictServerAspNetCoreOptions options)
202208
options.EnableTokenEndpointPassthrough = true;
203209
options.EnableUserInfoEndpointPassthrough = true;
204210

205-
// Note: caching is enabled for both authorization and end session requests to allow sending
206-
// large POST authorization and end session requests, but can be programmatically disabled, as the
207-
// authorization and end session views support flowing the entire payload and not just the request_id.
208-
options.EnableAuthorizationRequestCaching = true;
209-
options.EnableEndSessionRequestCaching = true;
210-
211211
// Note: error pass-through is enabled to allow the actions of the MVC authorization controller
212212
// to handle the errors returned by the interactive endpoints without relying on the generic
213213
// status code pages middleware to rewrite the response later in the request processing.

src/OrchardCore.Modules/OrchardCore.OpenId/Controllers/AccessController.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ public async Task<IActionResult> Authorize()
136136
return View(new AuthorizeViewModel
137137
{
138138
ApplicationName = await _applicationManager.GetLocalizedDisplayNameAsync(application),
139-
RequestId = request.RequestId,
140139
Scope = request.Scope
141140
});
142141
}
@@ -327,10 +326,7 @@ public async Task<IActionResult> Logout()
327326
}
328327
}
329328

330-
return View(new LogoutViewModel
331-
{
332-
RequestId = request.RequestId
333-
});
329+
return View();
334330
}
335331

336332
[ActionName(nameof(Logout)), AllowAnonymous, DisableCors]

src/OrchardCore.Modules/OrchardCore.OpenId/ViewModels/AuthorizeViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ public class AuthorizeViewModel
44
{
55
public string ApplicationName { get; set; }
66

7-
public string RequestId { get; set; }
8-
97
public string Scope { get; set; }
108
}

src/OrchardCore.Modules/OrchardCore.OpenId/ViewModels/LogoutViewModel.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/OrchardCore.Modules/OrchardCore.OpenId/Views/Access/Logout.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
@using Microsoft.Extensions.Primitives
2-
@using OrchardCore.OpenId.ViewModels
3-
@model LogoutViewModel
42

53
@{
64
ViewLayout = "Layout__Login";

src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Stores/OpenIdAuthorizationStore.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,10 @@ public virtual async ValueTask<long> PruneAsync(DateTimeOffset threshold, Cancel
295295

296296
var authorizations = (await _session.Query<TAuthorization, OpenIdAuthorizationIndex>(
297297
authorization => authorization.CreationDate < threshold.UtcDateTime &&
298-
(authorization.Status != OpenIddictConstants.Statuses.Valid ||
299-
(authorization.Type == OpenIddictConstants.AuthorizationTypes.AdHoc &&
298+
(authorization.Status != Statuses.Valid || authorization.Type == AuthorizationTypes.AdHoc) &&
300299
authorization.AuthorizationId.IsNotIn<OpenIdTokenIndex>(
301300
token => token.AuthorizationId,
302-
token => token.Id != 0))),
301+
token => token.Id != 0),
303302
collection: OpenIdCollection).Take(100).ListAsync()).ToList();
304303

305304
if (authorizations.Count is 0)

0 commit comments

Comments
 (0)