File tree 6 files changed +11
-8
lines changed
csharp/Client/test/FunctionalTests
common/Http.Connections/test
6 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 185
185
<Uri >https://github.com/dotnet/runtime</Uri >
186
186
<Sha >5d54b08d5fc40d0b1c156f430a487a94c1e34f79</Sha >
187
187
</Dependency >
188
- <Dependency Name =" Microsoft.SourceBuild.Intermediate.source-build-externals" Version =" 8.0.0-alpha.1.23329 .1" >
188
+ <Dependency Name =" Microsoft.SourceBuild.Intermediate.source-build-externals" Version =" 8.0.0-alpha.1.23368 .1" >
189
189
<Uri >https://github.com/dotnet/source-build-externals</Uri >
190
- <Sha >ac076c101e6fe5e8fbfbd0a0ab878bd3313d9138 </Sha >
190
+ <Sha >844e2cd86e7525d7eb32358e63a0c554187eb26b </Sha >
191
191
<SourceBuild RepoName =" source-build-externals" ManagedOnly =" true" />
192
192
</Dependency >
193
193
<Dependency Name =" Microsoft.SourceBuild.Intermediate.symreader" Version =" 2.0.0-beta-23228-03" >
Original file line number Diff line number Diff line change 163
163
<!-- Packages from dotnet/source-link -->
164
164
<MicrosoftSourceLinkGitHubVersion >8.0.0-beta.23328.1</MicrosoftSourceLinkGitHubVersion >
165
165
<!-- Packages from dotnet/source-build-externals -->
166
- <MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion >8.0.0-alpha.1.23329 .1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion >
166
+ <MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion >8.0.0-alpha.1.23368 .1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion >
167
167
<!-- Packages from dotnet/source-build-reference-packages -->
168
168
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion >8.0.0-alpha.1.23356.4</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion >
169
169
<!-- Packages from dotnet/symreader -->
Original file line number Diff line number Diff line change 5
5
using System . IdentityModel . Tokens . Jwt ;
6
6
using System . IO ;
7
7
using System . Security . Claims ;
8
+ using System . Security . Cryptography ;
8
9
using Microsoft . AspNetCore . Authentication . JwtBearer ;
9
10
using Microsoft . AspNetCore . Authentication . Negotiate ;
10
11
using Microsoft . AspNetCore . Authorization ;
@@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests;
21
22
22
23
public class Startup
23
24
{
24
- private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( Guid . NewGuid ( ) . ToByteArray ( ) ) ;
25
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( SHA256 . HashData ( Guid . NewGuid ( ) . ToByteArray ( ) ) ) ;
25
26
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler ( ) ;
26
27
27
28
public void ConfigureServices ( IServiceCollection services )
Original file line number Diff line number Diff line change 5
5
using System . IdentityModel . Tokens . Jwt ;
6
6
using System . Reflection ;
7
7
using System . Security . Claims ;
8
+ using System . Security . Cryptography ;
8
9
using Microsoft . AspNetCore . Authentication . JwtBearer ;
9
10
using Microsoft . AspNetCore . DataProtection ;
10
11
using Microsoft . AspNetCore . Http . Connections ;
@@ -19,7 +20,7 @@ namespace FunctionalTests;
19
20
20
21
public class Startup
21
22
{
22
- private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( Guid . NewGuid ( ) . ToByteArray ( ) ) ;
23
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( SHA256 . HashData ( Guid . NewGuid ( ) . ToByteArray ( ) ) ) ;
23
24
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler ( ) ;
24
25
25
26
private int _numRedirects ;
Original file line number Diff line number Diff line change 10
10
using System . Net . Http ;
11
11
using System . Net . WebSockets ;
12
12
using System . Security . Claims ;
13
+ using System . Security . Cryptography ;
13
14
using System . Security . Principal ;
14
15
using System . Text ;
15
16
using Microsoft . AspNetCore . Authentication ;
@@ -2988,7 +2989,7 @@ public async Task ConnectionClosedRequestedTriggeredOnAuthExpiration()
2988
2989
[ InlineData ( HttpTransportType . WebSockets ) ]
2989
2990
public async Task AuthenticationExpirationSetOnAuthenticatedConnectionWithJWT ( HttpTransportType transportType )
2990
2991
{
2991
- SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( Guid . NewGuid ( ) . ToByteArray ( ) ) ;
2992
+ SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( SHA256 . HashData ( Guid . NewGuid ( ) . ToByteArray ( ) ) ) ;
2992
2993
JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler ( ) ;
2993
2994
2994
2995
using var host = CreateHost ( services =>
@@ -3150,7 +3151,7 @@ public async Task AuthenticationExpirationSetOnAuthenticatedConnectionWithCookie
3150
3151
[ InlineData ( HttpTransportType . WebSockets ) ]
3151
3152
public async Task AuthenticationExpirationUsesCorrectScheme ( HttpTransportType transportType )
3152
3153
{
3153
- var SecurityKey = new SymmetricSecurityKey ( Guid . NewGuid ( ) . ToByteArray ( ) ) ;
3154
+ var SecurityKey = new SymmetricSecurityKey ( SHA256 . HashData ( Guid . NewGuid ( ) . ToByteArray ( ) ) ) ;
3154
3155
var JwtTokenHandler = new JwtSecurityTokenHandler ( ) ;
3155
3156
3156
3157
using var host = CreateHost ( services =>
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace JwtSample;
11
11
12
12
public class Startup
13
13
{
14
- private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( RandomNumberGenerator . GetBytes ( 16 ) ) ;
14
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey ( RandomNumberGenerator . GetBytes ( 32 ) ) ;
15
15
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler ( ) ;
16
16
17
17
public void ConfigureServices ( IServiceCollection services )
You can’t perform that action at this time.
0 commit comments