feat(worker): acknowledge alarms via authenticated AckMsg write
Claude-Session: https://claude.ai/code/session_016J6isfcgqy4SB2RK3ZvFvT
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;
|
||||
|
||||
/// <summary>
|
||||
/// Operator identity an alarm acknowledgement authenticates as. The password
|
||||
/// is a raw credential: it is passed to MXAccess <c>AuthenticateUser</c> only
|
||||
/// and must never be logged or echoed.
|
||||
/// </summary>
|
||||
public sealed class AlarmAckOperator
|
||||
{
|
||||
/// <summary>Gets or sets the operator user name.</summary>
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Gets or sets the optional domain for OS-authenticated galaxies.</summary>
|
||||
public string Domain { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Gets or sets the operator password (credential-sensitive).</summary>
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Gets the user string passed to <c>AuthenticateUser</c>: <c>Domain\UserName</c> when a domain is set.</summary>
|
||||
public string VerifyUser => string.IsNullOrEmpty(Domain) ? UserName : Domain + "\\" + UserName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString() => "AlarmAckOperator(" + VerifyUser + ")";
|
||||
}
|
||||
Reference in New Issue
Block a user