File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "sdk" : {
3- "version" : " 5.0.100" ,
4- "rollForward" : " latestMajor"
3+ "version" : " 6.0.100" ,
4+ "rollForward" : " latestMajor" ,
5+ "allowPrerelease" : false
56 }
67}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFrameworks >netcoreapp3.1;net5.0</TargetFrameworks >
3+ <TargetFrameworks >netcoreapp3.1;net5.0;net6.0 </TargetFrameworks >
44
55 <PackageId >IdentityModel.AspNetCore.OAuth2Introspection</PackageId >
66 <Description >ASP.NET Core authentication handler for validating tokens using OAuth 2.0 introspection</Description >
3535 </ItemGroup >
3636
3737 <ItemGroup >
38- <PackageReference Include =" IdentityModel" Version =" 5.1 .0" />
38+ <PackageReference Include =" IdentityModel" Version =" 5.2 .0" />
3939
4040 <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.0.0" PrivateAssets =" All" />
41- <PackageReference Include =" minver" Version =" 2.5.0 " PrivateAssets =" All" />
41+ <PackageReference Include =" minver" Version =" 3.0.0-alpha.1 " PrivateAssets =" All" />
4242 </ItemGroup >
4343</Project >
Original file line number Diff line number Diff line change 99using System . Security . Claims ;
1010using System . Text ;
1111using System . Text . Json ;
12+ using System . Text . Json . Serialization ;
1213using System . Threading . Tasks ;
1314
1415namespace IdentityModel . AspNetCore . OAuth2Introspection
1516{
1617 internal static class CacheExtensions
1718 {
18- internal readonly static JsonSerializerOptions Options ;
19+ private static readonly JsonSerializerOptions Options ;
1920
2021 static CacheExtensions ( )
2122 {
23+
24+ #if NET6_0_OR_GREATER
25+ Options = new JsonSerializerOptions
26+ {
27+ IgnoreReadOnlyFields = true ,
28+ IgnoreReadOnlyProperties = true ,
29+ DefaultIgnoreCondition = JsonIgnoreCondition . WhenWritingNull
30+ } ;
31+ #else
2232 Options = new JsonSerializerOptions
2333 {
2434 IgnoreReadOnlyFields = true ,
2535 IgnoreReadOnlyProperties = true ,
2636 IgnoreNullValues = true
2737 } ;
38+ #endif
2839
2940 Options . Converters . Add ( new ClaimConverter ( ) ) ;
3041 }
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
2- <PropertyGroup >
3- <TargetFrameworks >netcoreapp3.1;net5.0</TargetFrameworks >
2+
3+ <PropertyGroup Condition =" '$(NETCoreSdkPortableRuntimeIdentifier)' != 'osx-arm64' " >
4+ <TargetFrameworks >netcoreapp3.1;net5.0;net6.0</TargetFrameworks >
5+ </PropertyGroup >
6+
7+ <PropertyGroup Condition =" '$(NETCoreSdkPortableRuntimeIdentifier)' == 'osx-arm64' " >
8+ <TargetFramework >net6.0</TargetFramework >
49 </PropertyGroup >
510
611 <ItemGroup >
2530 <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0' " >
2631 <PackageReference Include =" Microsoft.AspNetCore.TestHost" Version =" 5.0.0" />
2732 </ItemGroup >
33+
34+ <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0' " >
35+ <PackageReference Include =" Microsoft.AspNetCore.TestHost" Version =" 6.0.0" />
36+ </ItemGroup >
2837
2938
3039</Project >
Original file line number Diff line number Diff line change 1212using System . Text ;
1313using Microsoft . AspNetCore . Http ;
1414using System ;
15+ using System . Threading . Tasks ;
1516using IdentityModel . AspNetCore . OAuth2Introspection ;
1617
1718namespace Tests . Util
@@ -41,8 +42,8 @@ public static TestServer CreateServer(Action<OAuth2IntrospectionOptions> options
4142 . Configure ( app =>
4243 {
4344 app . UseAuthentication ( ) ;
44-
45- app . Use ( async ( context , next ) =>
45+
46+ app . Run ( async context =>
4647 {
4748 var user = context . User ;
4849
You can’t perform that action at this time.
0 commit comments