Refactor JWT configuration handling in Program.cs and TokenService.cs
Java CI / build (push) Successful in 48s
.NET+Docker CI/CD / Unit and Integration tests (push) Successful in 34s
Release CI / build-and-upload-mod (push) Successful in 7s
Release CI / build-and-upload-mod (release) Successful in 8s
.NET+Docker CI/CD / Push Docker image to ghcr.io (push) Failing after 27s
Java CI / build (push) Successful in 48s
.NET+Docker CI/CD / Unit and Integration tests (push) Successful in 34s
Release CI / build-and-upload-mod (push) Successful in 7s
Release CI / build-and-upload-mod (release) Successful in 8s
.NET+Docker CI/CD / Push Docker image to ghcr.io (push) Failing after 27s
Signed-off-by: Dmitrii <computer@yawaflua.tech> Took 23 minutes
This commit is contained in:
@@ -19,8 +19,10 @@ public class Program
|
||||
.AddJsonFile("appsettings.Development.json", true)
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
var encryptionKey = builder.Configuration["Encryption:Key"] ?? "a-default-fallback-only-for-dev-key-change-this!";
|
||||
var conf = builder.Configuration;
|
||||
var encryptionKey = conf["Encryption:Key"] ?? "a-default-fallback-only-for-dev-key-change-this!";
|
||||
EncryptionHelper.Initialize(encryptionKey);
|
||||
_ = conf["JWT:Secret"] ?? conf["JWT__Secret"] ?? throw new InvalidOperationException("JWT__Secret is not configured.");
|
||||
|
||||
builder.Services.AddAuthorization();
|
||||
builder.Services.AddLogging(logging =>
|
||||
|
||||
Reference in New Issue
Block a user