With the changes to Program.cs in .Net Core 7, we can still access confirmation options as below
appsettings.json
Program.cs{
"Settings": {
"AccessTokenKey": "abcd123",
"AccessTokenExpirySeconds": 3600,
"RefreshTokenExpiryDays": 30
}
}
var builder = WebApplication.CreateBuilder();
ConfigurationManager config= builder.Configuration; // allows access to the config
IWebHostEnvironment environment = builder.Environment;// access the environment
var key = builder .Configuration["Settings:AccessTokenKey"];
Cheers,
Samitha
No comments:
Post a Comment