// 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.Authentication.Cookies;
namespace Microsoft.AspNetCore.Identity
{
///
/// Provides an abstraction for a validating a security stamp of an incoming identity, and regenerating or rejecting the
/// identity based on the validation result.
///
public interface ISecurityStampValidator
{
///
/// Validates a security stamp of an identity as an asynchronous operation, and rebuilds the identity if the validation succeeds, otherwise rejects
/// the identity.
///
/// The context containing the
/// and to validate.
/// The that represents the asynchronous validation operation.
Task ValidateAsync(CookieValidatePrincipalContext context);
}
}