feat: add standalone LmxProxy solution, windev VM documentation
Split LmxProxy Host and Client into a self-contained solution under lmxproxy/, ported from the ScadaBridge monorepo with updated namespaces (ZB.MOM.WW.LmxProxy.*). Client project (.NET 10) inlines Core/DataEngine dependencies and builds clean. Host project (.NET Fx 4.8) retains ArchestrA.MXAccess for Windows deployment. Added windev.md documenting the WW_DEV_VM development environment setup.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
namespace ZB.MOM.WW.LmxProxy.Host.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an API key with associated permissions
|
||||
/// </summary>
|
||||
public class ApiKey
|
||||
{
|
||||
/// <summary>
|
||||
/// The API key value
|
||||
/// </summary>
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description of what this API key is used for
|
||||
/// </summary>
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The role assigned to this API key
|
||||
/// </summary>
|
||||
public ApiKeyRole Role { get; set; } = ApiKeyRole.ReadOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this API key is enabled
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the API key is valid
|
||||
/// </summary>
|
||||
public bool IsValid() => Enabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// API key roles
|
||||
/// </summary>
|
||||
public enum ApiKeyRole
|
||||
{
|
||||
/// <summary>
|
||||
/// Can only read data
|
||||
/// </summary>
|
||||
ReadOnly,
|
||||
|
||||
/// <summary>
|
||||
/// Can read and write data
|
||||
/// </summary>
|
||||
ReadWrite
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user