We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae0ae69 commit f83817eCopy full SHA for f83817e
src/SignalR/samples/JwtSample/Startup.cs
@@ -18,16 +18,9 @@ namespace JwtSample
18
{
19
public class Startup
20
21
- private readonly SymmetricSecurityKey SecurityKey;
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(RandomNumberGenerator.GetBytes(16));
22
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
23
24
- public Startup()
25
- {
26
- var key = new byte[16];
27
- RandomNumberGenerator.Fill(key);
28
- SecurityKey = new SymmetricSecurityKey(key);
29
- }
30
-
31
public void ConfigureServices(IServiceCollection services)
32
33
services.AddSignalR();
0 commit comments