File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
tests/Microsoft.Identity.Web.Test Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 99using System . Threading . Tasks ;
1010using Microsoft . AspNetCore . Authentication ;
1111using Microsoft . AspNetCore . Authentication . Cookies ;
12+ using Microsoft . AspNetCore . Authentication . JwtBearer ;
1213using Microsoft . AspNetCore . Authentication . OpenIdConnect ;
1314using Microsoft . AspNetCore . Components . Server . Circuits ;
1415using Microsoft . AspNetCore . Http ;
3334using NSubstitute ;
3435using NSubstitute . Extensions ;
3536using Xunit ;
37+ using TokenValidatedContext = Microsoft . AspNetCore . Authentication . OpenIdConnect . TokenValidatedContext ;
3638
3739namespace Microsoft . Identity . Web . Test
3840{
@@ -886,5 +888,17 @@ public void PreventChangesInOpenIdConnectOptionsToBeOverlooked()
886888 //System.IO.File.WriteAllLines(@"C:\temp\net8.txt", typeof(OpenIdConnectOptions).GetProperties().Select(p => p.Name));
887889 Assert . Equal ( expectedNumberOfProperties , numberOfProperties ) ;
888890 }
891+
892+ [ Fact ]
893+ public void PreventChangesInJwtBearerOptionsToBeOverlooked ( )
894+ {
895+ int numProps = typeof ( JwtBearerOptions ) . GetProperties ( System . Reflection . BindingFlags . Public | System . Reflection . BindingFlags . Instance ) . Length ;
896+ #if NET8_0_OR_GREATER
897+ int expectedNumberOfProperties = 32 ;
898+ #else
899+ int expectedNumberOfProperties = 29 ;
900+ #endif
901+ Assert . Equal ( expectedNumberOfProperties , numProps ) ;
902+ }
889903 }
890904}
You can’t perform that action at this time.
0 commit comments