// 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.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Authentication { /// /// Created per request to handle authentication for to a particular scheme. /// public interface IAuthenticationHandler { /// /// The handler should initialize anything it needs from the request and scheme here. /// /// The scheme. /// The context. /// Task InitializeAsync(AuthenticationScheme scheme, HttpContext context); /// /// Authentication behavior. /// /// The context. /// The result. Task AuthenticateAsync(AuthenticateContext context); /// /// Challenge behavior. /// /// The context. /// A task. Task ChallengeAsync(ChallengeContext context); /// /// Handle sign in. /// /// The context. /// A task. Task SignInAsync(SignInContext context); /// /// Signout behavior. /// /// The context. /// A task. Task SignOutAsync(SignOutContext context); } }