-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Hi,
I'm trying to add authentication to the dashboard but it doesn't work (error 401).
Steps
/Authenticate/Login
username and password (correct, if I insert a wrong password, i got username or password not valid)
Redirect to /quartz but with errore Http401
This is my configuration.
builder.Services.AddSilkierQuartz(
options =>
{
options.Scheduler = scheduler;
options.VirtualPathRoot = "/quartz";
options.UseLocalTime = true;
options.DefaultDateFormat = "yyyy-MM-dd";
options.DefaultTimeFormat = "HH:mm:ss";
options.CronExpressionOptions = new CronExpressionDescriptor.Options
{
DayOfWeekStartIndexZero = false
};
},
auth =>
{
auth.AccessRequirement = SilkierQuartzAuthenticationOptions.SimpleAccessRequirement.AllowOnlyAuthenticated;
auth.UserName = "admin";
auth.Password = "password";
});
.........
app.UseAuthentication();
app.UseAuthorization();
var options = app.Services.GetRequiredService<IOptions>();
scheduler.JobFactory = new MicrosoftDependencyInjectionJobFactory(app.Services, options);
app.UseSilkierQuartz();
What is my mistake?
Thank you for your support.