using BotSharp.Abstraction.Users.Models;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
namespace BotSharp.Abstraction.Users;
public interface IAuthenticationHook
{
///
/// Interupt the authentication process, and return the user object if the user is authenticated
///
///
///
///
Task Authenticate(string id, string password);
///
/// Add extra claims to user
///
///
///
bool AddClaims(List claims)
=> true;
///
/// User authenticated successfully
///
///
///
bool UserAuthenticated(JwtSecurityToken token)
=> true;
///
/// Bfore user updating
///
///
///
Task UserUpdating(User user);
///
/// After user created
///
///
///
Task UserCreated(User user);
///
/// Reset password
///
///
///
Task VerificationCodeResetPassword(User user);
///
/// Delete users
///
///
///
Task DelUsers(List userIds);
}