25 lines
1.0 KiB
C#
25 lines
1.0 KiB
C#
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 + ")";
|
|
}
|