public string SignIn(SignInModel signInModel) { new SignInModelValidator().ValidateThrow(signInModel); TransformLoginAndPasswordToHash(signInModel); var signedInModel = UserRepository.SignIn(signInModel); new SignedInModelValidator().ValidateThrow(signedInModel); var userLogModel = new UserLogModel(signedInModel.UserId, LogType.Login); UserLogDomain.Save(userLogModel); return(CreateJwt(signedInModel)); }
public void SignOut(SignOutModel signOutModel) { var userLogModel = new UserLogModel(signOutModel.UserId, LogType.Logout); UserLogDomain.Save(userLogModel); }