// 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 System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Authentication
{
///
/// Responsible for managing what authenticationSchemes are supported.
///
public interface IAuthenticationSchemeProvider
{
///
/// Returns all currently registered s.
///
/// All currently registered s.
Task> GetAllSchemesAsync();
///
/// Returns the matching the name, or null.
///
/// The name of the authenticationScheme.
/// The scheme or null if not found.
Task GetSchemeAsync(string name);
///
/// Returns the scheme that will be used by default for .
/// This is typically specified via .
/// Otherwise, if only a single scheme exists, that will be used, if more than one exists, null will be returned.
///
/// The scheme that will be used by default for .
Task GetDefaultAuthenticateSchemeAsync();
///
/// Returns the scheme that will be used by default for .
/// This is typically specified via .
/// Otherwise, if only a single scheme exists, that will be used, if more than one exists, null will be returned.
///
/// The scheme that will be used by default for .
Task GetDefaultChallengeSchemeAsync();
///
/// Returns the scheme that will be used by default for .
/// This is typically specified via .
/// Otherwise, if only a single scheme exists, that will be used, if more than one exists, null will be returned.
///
/// The scheme that will be used by default for .
Task GetDefaultSignInSchemeAsync();
///
/// Registers a scheme for use by .
///
/// The scheme.
void AddScheme(AuthenticationScheme scheme);
///
/// Removes a scheme, preventing it from being used by .
///
/// The name of the authenticationScheme being removed.
void RemoveScheme(string name);
///
/// Returns the schemes in priority order for request handling.
///
/// The schemes in priority order for request handling
Task> GetRequestHandlerSchemesAsync();
}
}