using System.Security.Principal; namespace EmbedIO.Authentication { /// /// Provides useful authentication-related constants. /// public static class Auth { /// /// Gets an interface representing /// no user. To be used instead of /// to initialize or set properties of type . /// public static IPrincipal NoUser { get; } = new GenericPrincipal( new GenericIdentity(string.Empty, string.Empty), null); /// /// Creates and returns an interface /// representing an unauthenticated user, with the given /// authentication type. /// /// The type of authentication used to identify the user. /// An interface. public static IPrincipal CreateUnauthenticatedPrincipal(string authenticationType) => new GenericPrincipal( new GenericIdentity(string.Empty, authenticationType), null); } }