Skip to content

Dashboard - Adding authentication #173

@Netclick19

Description

@Netclick19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions