// 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.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Authentication
{
///
/// Used to provide authentication.
///
public interface IAuthenticationService
{
///
/// Authenticate for the specified authentication scheme.
///
/// The .
/// The name of the authentication scheme.
/// The result.
Task AuthenticateAsync(HttpContext context, string scheme);
///
/// Challenge the specified authentication scheme.
///
/// The .
/// The name of the authentication scheme.
/// The .
/// The .
/// A task.
Task ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties, ChallengeBehavior behavior);
///
/// Sign a principal in for the specified authentication scheme.
///
/// The .
/// The name of the authentication scheme.
/// The to sign in.
/// The .
/// A task.
Task SignInAsync(HttpContext context, string scheme, ClaimsPrincipal principal, AuthenticationProperties properties);
///
/// Sign out the specified authentication scheme.
///
/// The .
/// The name of the authentication scheme.
/// The .
/// A task.
Task SignOutAsync(HttpContext context, string scheme, AuthenticationProperties properties);
}
}