mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 10:43:13 +00:00
22 lines
914 B
C#
22 lines
914 B
C#
|
|
namespace SeaHaven.Services.Interfaces
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// Ties a sign-in token to the account's security stamp, so a password reset or
|
||
|
|
/// change, a deactivation, or a deletion ends every session issued before it.
|
||
|
|
/// </summary>
|
||
|
|
public interface ISessionStampService
|
||
|
|
{
|
||
|
|
/// <summary>The value a token carries for <paramref name="securityStamp"/>.</summary>
|
||
|
|
string ClaimValueFor(string securityStamp);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// True when <paramref name="claimValue"/> matches the stamp of an account that
|
||
|
|
/// exists and is not deleted. Stored stamps are cached briefly.
|
||
|
|
/// </summary>
|
||
|
|
Task<bool> IsCurrentAsync(string userId, string? claimValue, CancellationToken cancellationToken);
|
||
|
|
|
||
|
|
/// <summary>Drops the cached stamp; call after a change to the stamp or the account is saved.</summary>
|
||
|
|
void Forget(string userId);
|
||
|
|
}
|
||
|
|
}
|