Skip to content

Commit 29e9cb4

Browse files
Update to ASP.NET Core 8 preview 5 (#150)
- Update to preview 5 of ASP.NET Core 8. - Remove now-obsolete use of `ISystemClock`. - Fix code analysis warning by using `TryGetValue()`.
1 parent c2ca948 commit 29e9cb4

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
66
<PackageVersion Include="JustEat.HttpClientInterception" Version="3.1.2" />
77
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.3.0" />
8-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0-preview.4.23260.4" />
9-
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.0-preview.4.23260.4" />
8+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0-preview.5.23302.2" />
9+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.0-preview.5.23302.2" />
1010
<PackageVersion Include="Microsoft.IdentityModel.Protocols" Version="6.10.0" />
1111
<PackageVersion Include="Shouldly" Version="4.1.0" />
12-
<PackageVersion Include="System.Text.Json" Version="8.0.0-preview.4.23259.5" />
12+
<PackageVersion Include="System.Text.Json" Version="8.0.0-preview.5.23280.8" />
1313
</ItemGroup>
1414

1515
</Project>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
88
<PackageValidationBaselineVersion>7.0.0</PackageValidationBaselineVersion>
99
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
10-
<PreReleaseVersionIteration>3</PreReleaseVersionIteration>
10+
<PreReleaseVersionIteration>5</PreReleaseVersionIteration>
1111
<PreReleaseBrandingLabel>Preview $(PreReleaseVersionIteration)</PreReleaseBrandingLabel>
1212
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1313
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"sdk": {
3-
"version": "8.0.100-preview.4.23260.5"
3+
"version": "8.0.100-preview.5.23303.2"
44
},
55

66
"tools": {
7-
"dotnet": "8.0.100-preview.4.23260.5"
7+
"dotnet": "8.0.100-preview.5.23303.2"
88
},
99

1010
"msbuild-sdks": {

src/AspNet.Security.OpenId.Steam/SteamAuthenticationHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ public partial class SteamAuthenticationHandler : OpenIdAuthenticationHandler<St
2020
public SteamAuthenticationHandler(
2121
[NotNull] IOptionsMonitor<SteamAuthenticationOptions> options,
2222
[NotNull] ILoggerFactory logger,
23-
[NotNull] UrlEncoder encoder,
24-
[NotNull] ISystemClock clock)
25-
: base(options, logger, encoder, clock)
23+
[NotNull] UrlEncoder encoder)
24+
: base(options, logger, encoder)
2625
{
2726
}
2827

src/AspNet.Security.OpenId/OpenIdAuthenticationHandler.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ public class OpenIdAuthenticationHandler : OpenIdAuthenticationHandler<OpenIdAut
1919
public OpenIdAuthenticationHandler(
2020
[NotNull] IOptionsMonitor<OpenIdAuthenticationOptions> options,
2121
[NotNull] ILoggerFactory logger,
22-
[NotNull] UrlEncoder encoder,
23-
[NotNull] ISystemClock clock)
24-
: base(options, logger, encoder, clock)
22+
[NotNull] UrlEncoder encoder)
23+
: base(options, logger, encoder)
2524
{
2625
}
2726
}
@@ -32,9 +31,8 @@ public partial class OpenIdAuthenticationHandler<TOptions> : RemoteAuthenticatio
3231
public OpenIdAuthenticationHandler(
3332
[NotNull] IOptionsMonitor<TOptions> options,
3433
[NotNull] ILoggerFactory logger,
35-
[NotNull] UrlEncoder encoder,
36-
[NotNull] ISystemClock clock)
37-
: base(options, logger, encoder, clock)
34+
[NotNull] UrlEncoder encoder)
35+
: base(options, logger, encoder)
3836
{
3937
}
4038

@@ -419,14 +417,14 @@ private async Task<bool> VerifyAssertionAsync([NotNull] OpenIdAuthenticationMess
419417

420418
// Stop processing the assertion if the mandatory is_valid
421419
// parameter was missing from the response body.
422-
if (!parameters.ContainsKey(OpenIdAuthenticationConstants.Parameters.IsValid))
420+
if (!parameters.TryGetValue(OpenIdAuthenticationConstants.Parameters.IsValid, out var isValid))
423421
{
424422
Log.InvalidCheckAuthenticationResponse(Logger);
425423
return false;
426424
}
427425

428426
// Stop processing the assertion if the authentication server declared it as invalid.
429-
if (!string.Equals(parameters[OpenIdAuthenticationConstants.Parameters.IsValid], "true", StringComparison.Ordinal))
427+
if (!string.Equals(isValid, "true", StringComparison.Ordinal))
430428
{
431429
Log.InvalidSecurityAssertion(Logger);
432430
return false;

0 commit comments

Comments
 (0)