示例#1
0
 public SuccessfulLoginAuditMessage(User user)
 {
     Category       = "SUCCESSFUL_LOGIN";
     Description    = $"User {user.Email} (id: {user.Id}) logged in";
     AffectedEntity = new Audit.Types.Entity
     {
         Type = UserTypeName,
         Id   = user.Id
     };
 }
示例#2
0
 public FailedLoginAuditMessage(string emailAddress, User user)
 {
     Category       = "FAILED_LOGIN";
     AffectedEntity = new Audit.Types.Entity
     {
         Type = UserTypeName,
         Id   = user.Id
     };
     Description       = $"User {user.Email} (id: {user.Id})attempted to login with the incorrect password";
     ChangedProperties = new List <PropertyUpdate>
     {
         PropertyUpdate.FromInt(nameof(user.FailedLoginAttempts), user.FailedLoginAttempts)
     };
 }