Add AuthenticationDisplayName to HttpSys (#21410)
* Add AuthenticationDisplayName to HttpSys * update reference assembly * Update Microsoft.AspNetCore.Server.HttpSys.netcoreapp.cs * Trigger build
This commit is contained in:
parent
d902e041f9
commit
a4c45262fb
|
|
@ -15,6 +15,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
{
|
||||
internal AuthenticationManager() { }
|
||||
public bool AllowAnonymous { get { throw null; } set { } }
|
||||
public string AuthenticationDisplayName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public bool AutomaticAuthentication { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public Microsoft.AspNetCore.Server.HttpSys.AuthenticationSchemes Schemes { get { throw null; } set { } }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
/// </summary>
|
||||
public bool AutomaticAuthentication { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the display name shown to users on login pages. The default is null.
|
||||
/// </summary>
|
||||
public string AuthenticationDisplayName { get; set; }
|
||||
|
||||
internal void SetUrlGroupSecurity(UrlGroup urlGroup)
|
||||
{
|
||||
Debug.Assert(_urlGroup == null, "SetUrlGroupSecurity called more than once.");
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
|
||||
if (_options.Authentication.Schemes != AuthenticationSchemes.None)
|
||||
{
|
||||
authentication.AddScheme(new AuthenticationScheme(HttpSysDefaults.AuthenticationScheme, displayName: null, handlerType: typeof(AuthenticationHandler)));
|
||||
authentication.AddScheme(new AuthenticationScheme(HttpSysDefaults.AuthenticationScheme, displayName: _options.Authentication.AuthenticationDisplayName, handlerType: typeof(AuthenticationHandler)));
|
||||
}
|
||||
|
||||
Features = new FeatureCollection();
|
||||
|
|
|
|||
Loading…
Reference in New Issue