Quellcode durchsuchen

Created DefaultChallengeScheme on CAP.DashboardOptions.cs to specify dashboard auth challenge scheme (#815)

master
Mateus Viegas vor 3 Jahren
committed by GitHub
Ursprung
Commit
b7649308b2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen
  1. +1
    -0
      samples/Sample.RabbitMQ.Postgres.DashboardAuth/Startup.cs
  2. +1
    -1
      src/DotNetCore.CAP.Dashboard/CAP.DashboardMiddleware.cs
  3. +6
    -0
      src/DotNetCore.CAP.Dashboard/CAP.DashboardOptions.cs

+ 1
- 0
samples/Sample.RabbitMQ.Postgres.DashboardAuth/Startup.cs Datei anzeigen

@@ -62,6 +62,7 @@ namespace Sample.RabbitMQ.Postgres.DashboardAuth
cap.UseDashboard(d =>
{
d.UseChallengeOnAuth = true;
d.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
d.Authorization = new[] {new HttpContextDashboardFilter()};
});
});


+ 1
- 1
src/DotNetCore.CAP.Dashboard/CAP.DashboardMiddleware.cs Datei anzeigen

@@ -136,7 +136,7 @@ namespace DotNetCore.CAP

if (_options.UseChallengeOnAuth)
{
await context.ChallengeAsync();
await context.ChallengeAsync(_options.DefaultChallengeScheme);
return;
}



+ 6
- 0
src/DotNetCore.CAP.Dashboard/CAP.DashboardOptions.cs Datei anzeigen

@@ -3,6 +3,7 @@

using System.Collections.Generic;
using DotNetCore.CAP.Dashboard;
using Microsoft.AspNetCore.Authentication.Cookies;

// ReSharper disable once CheckNamespace
namespace DotNetCore.CAP
@@ -18,6 +19,11 @@ namespace DotNetCore.CAP
UseChallengeOnAuth = false;
}

/// <summary>
/// Default ChallengeScheme used for Dashboard authentication. If no scheme is set, the DefaultScheme set up in AddAuthentication will be used.
/// </summary>
public string DefaultChallengeScheme { get; set; }
/// <summary>
/// Indicates if executes a Challenge for Auth within ASP.NET middlewares
/// </summary>


Laden…
Abbrechen
Speichern