namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
public static class DashboardAuthenticationDefaults
{
/// Cookie scheme used to authenticate interactive dashboard requests.
public const string AuthenticationScheme = "MxGateway.Dashboard";
///
/// Bearer scheme used to authenticate SignalR hub connections. Hubs cannot
/// reuse the browser's HttpOnly cookie when the client SignalR JS resolves
/// the cookie scope to loopback, so the dashboard mints a short-lived
/// data-protected bearer token on demand.
///
public const string HubAuthenticationScheme = "MxGateway.Dashboard.HubToken";
///
/// Policy guarding read-only dashboard pages. Allowed roles:
/// or .
///
public const string ViewerPolicy = "MxGateway.Dashboard.Viewer";
///
/// Policy guarding write-capable dashboard pages and admin endpoints
/// (API-key CRUD, settings edits, hub publishes). Allowed role:
/// .
///
public const string AdminPolicy = "MxGateway.Dashboard.Admin";
///
/// Policy attached to SignalR hubs — accepts either the cookie scheme
/// (in-page connect) or the hub-token bearer scheme (cross-origin or
/// WebSocket connect where the cookie can't be forwarded).
///
public const string HubClientsPolicy = "MxGateway.Dashboard.HubClients";
public const string LdapGroupClaimType = "mxgateway:ldap_group";
public const string KeyPrefixClaimType = "mxgateway:key_prefix";
public const string CookieName = "__Host-MxGatewayDashboard";
}