// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http.Authentication; using System.ComponentModel; namespace Microsoft.AspNetCore.Builder { /// /// Base Options for all authentication middleware. /// public abstract class AuthenticationOptions { private string _authenticationScheme; /// /// The AuthenticationScheme in the options corresponds to the logical name for a particular authentication scheme. A different /// value may be assigned in order to use the same authentication middleware type more than once in a pipeline. /// public string AuthenticationScheme { get { return _authenticationScheme; } set { _authenticationScheme = value; Description.AuthenticationScheme = value; } } /// /// If true the authentication middleware alter the request user coming in. If false the authentication middleware will only provide /// identity when explicitly indicated by the AuthenticationScheme. /// public bool AutomaticAuthenticate { get; set; } /// /// If true the authentication middleware should handle automatic challenge. /// If false the authentication middleware will only alter responses when explicitly indicated by the AuthenticationScheme. /// public bool AutomaticChallenge { get; set; } /// /// Gets or sets the issuer that should be used for any claims that are created /// public string ClaimsIssuer { get; set; } /// /// Additional information about the authentication type which is made available to the application. /// public AuthenticationDescription Description { get; set; } = new AuthenticationDescription(); /// /// For testing purposes only. /// [EditorBrowsable(EditorBrowsableState.Never)] public ISystemClock SystemClock { get; set; } = new SystemClock(); } }