Show / Hide Table of Contents

Class WMPrincipal

Abstract base class representing an entity to which access privileges can be granted.

Inheritance
object
WMPrincipal
WMOrganization
WMUser
WMProxyPrincipal
Implements
IDbEntity
IWMEntity
IPolicyAssignable
IWMAssetOwner
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Auth
Assembly: WMServer.dll
Syntax
public abstract class WMPrincipal : IDbEntity, IWMEntity, IPolicyAssignable, IWMAssetOwner

Constructors

WMPrincipal()

Default constructor initializes ID with a new GUID.

Declaration
public WMPrincipal()

WMPrincipal(string)

Declaration
public WMPrincipal(string id)
Parameters
Type Name Description
string id

Properties

CreatedBy

ID of the user that created this entity.

Declaration
public string CreatedBy { get; set; }
Property Value
Type Description
string

CreatedDate

Date and time at which this entity was last updated.

Declaration
public DateTime CreatedDate { get; set; }
Property Value
Type Description
DateTime

ID

Declaration
public string ID { get; protected set; }
Property Value
Type Description
string

LastUpdatedBy

ID of the user that last updated this entity.

Declaration
public string LastUpdatedBy { get; set; }
Property Value
Type Description
string

LastUpdatedDate

Date and time at which this entity was last updated.

Declaration
public DateTime LastUpdatedDate { get; set; }
Property Value
Type Description
DateTime

Name

Actual name of the principal

Declaration
public string Name { get; set; }
Property Value
Type Description
string

Policies

List of Policy instances assigned to this WMPrincipal

Declaration
public virtual List<Policy> Policies { get; }
Property Value
Type Description
List<Policy>

Status

Declaration
public PrincipalStatus Status { get; set; }
Property Value
Type Description
PrincipalStatus

Methods

Get(string, string)

Static factory that gets the instance of a WMPrincipal sub-class depending on its type and ID.

Declaration
public static Task<WMPrincipal> Get(string typeName, string id)
Parameters
Type Name Description
string typeName
string id
Returns
Type Description
Task<WMPrincipal>

HashPassword(string, out string)

Declaration
public static string HashPassword(string password, out string salt)
Parameters
Type Name Description
string password
string salt
Returns
Type Description
string
Exceptions
Type Condition
ArgumentNullException

VerifyPassword(string, string, string)

Declaration
public static bool VerifyPassword(string password, string hash, string salt)
Parameters
Type Name Description
string password
string hash
string salt
Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

Implements

IDbEntity
IWMEntity
IPolicyAssignable
IWMAssetOwner
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE