// 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;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Identity
{
///
/// Provides an abstraction for a store which stores a user's security stamp.
///
/// The type encapsulating a user.
public interface IUserSecurityStampStore : IUserStore where TUser : class
{
///
/// Sets the provided security for the specified .
///
/// The user whose security stamp should be set.
/// The security stamp to set.
/// The used to propagate notifications that the operation should be canceled.
/// The that represents the asynchronous operation.
Task SetSecurityStampAsync(TUser user, string stamp, CancellationToken cancellationToken);
///
/// Get the security stamp for the specified .
///
/// The user whose security stamp should be set.
/// The used to propagate notifications that the operation should be canceled.
/// The that represents the asynchronous operation, containing the security stamp for the specified .
Task GetSecurityStampAsync(TUser user, CancellationToken cancellationToken);
}
}