Skip to content

Commit a89814e

Browse files
committed
Merge branch 'auth0'
2 parents 5e86be7 + a5ae0c8 commit a89814e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

RequestTests.paw

636 Bytes
Binary file not shown.

src/SimpleToDoService/Startup.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using Microsoft.AspNetCore.Builder;
33
using Microsoft.AspNetCore.Hosting;
44
using Microsoft.EntityFrameworkCore;
@@ -61,14 +61,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
6161

6262
app.UseJwtBearerAuthentication(new JwtBearerOptions
6363
{
64+
6465
AutomaticAuthenticate = true,
65-
Authority = "https://securetoken.google.com/simpletaskmanager-9c565",
66+
Authority = Environment.GetEnvironmentVariable("JWT_AUTHORITY"),
6667
TokenValidationParameters = new TokenValidationParameters
6768
{
69+
6870
ValidateIssuer = true,
69-
ValidIssuer = "https://securetoken.google.com/simpletaskmanager-9c565",
71+
ValidIssuer = Environment.GetEnvironmentVariable("JWT_AUTHORITY"),
7072
ValidateAudience = true,
71-
ValidAudience = "simpletaskmanager-9c565",
73+
ValidAudience = Environment.GetEnvironmentVariable("JWT_AUDIENCE"),
7274
ValidateLifetime = true
7375
}
7476
});

0 commit comments

Comments
 (0)