mirror of
https://github.com/fergalmoran/SilkierQuartz.git
synced 2025-12-26 19:49:28 +00:00
重命名了UseSilkierQuartzAuthentication
This commit is contained in:
@@ -47,7 +47,7 @@ namespace SilkierQuartz.Example
|
|||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.AddSilkierQuartzAuthentication();
|
app.UseSilkierQuartzAuthentication() ;
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseSilkierQuartz(
|
app.UseSilkierQuartz(
|
||||||
new SilkierQuartzOptions()
|
new SilkierQuartzOptions()
|
||||||
|
|||||||
@@ -167,10 +167,6 @@ namespace SilkierQuartz
|
|||||||
|
|
||||||
public static IServiceCollection AddSilkierQuartz(this IServiceCollection services, Action<NameValueCollection> stdSchedulerFactoryOptions = null, Func<List<Assembly>> jobsasmlist = null)
|
public static IServiceCollection AddSilkierQuartz(this IServiceCollection services, Action<NameValueCollection> stdSchedulerFactoryOptions = null, Func<List<Assembly>> jobsasmlist = null)
|
||||||
{
|
{
|
||||||
services.AddControllers()
|
|
||||||
.AddApplicationPart(Assembly.GetExecutingAssembly())
|
|
||||||
.AddNewtonsoftJson();
|
|
||||||
|
|
||||||
services.AddAuthentication(SilkierQuartzAuthenticateConfig.AuthScheme).AddCookie(
|
services.AddAuthentication(SilkierQuartzAuthenticateConfig.AuthScheme).AddCookie(
|
||||||
SilkierQuartzAuthenticateConfig.AuthScheme,
|
SilkierQuartzAuthenticateConfig.AuthScheme,
|
||||||
cfg =>
|
cfg =>
|
||||||
@@ -236,13 +232,12 @@ namespace SilkierQuartz
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="app">The <see cref="IApplicationBuilder"/> to add the middleware to.</param>
|
/// <param name="app">The <see cref="IApplicationBuilder"/> to add the middleware to.</param>
|
||||||
/// <returns>A reference to this instance after the operation has completed.</returns>
|
/// <returns>A reference to this instance after the operation has completed.</returns>
|
||||||
public static IApplicationBuilder AddSilkierQuartzAuthentication(this IApplicationBuilder app)
|
public static IApplicationBuilder UseSilkierQuartzAuthentication(this IApplicationBuilder app)
|
||||||
{
|
{
|
||||||
if (app == null)
|
if (app == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(app));
|
throw new ArgumentNullException(nameof(app));
|
||||||
}
|
}
|
||||||
|
|
||||||
return app.UseMiddleware<SilkierQuartzAuthenticationMiddleware>();
|
return app.UseMiddleware<SilkierQuartzAuthenticationMiddleware>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user