Endpoint authorization

Tokens are validated for some of the endpoints. Need to add other measures to rule out bogus tokens.
This commit is contained in:
Kun Deng
2022-08-26 18:01:29 -04:00
parent 2cc13ac9bb
commit d48716a54f
7 changed files with 221 additions and 12 deletions
+1 -1
View File
@@ -151,6 +151,7 @@ namespace Icarus
var domain = $"https://{auth_id}/";
var audience = Configuration["Auth0:ApiIdentifier"];
/**
services
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
@@ -159,7 +160,6 @@ namespace Icarus
options.Audience = audience;
});
/**
services.AddAuthorization(options =>
{
options.AddPolicy("download:songs", policy =>