Options
Menu

This is a convenience class providing utilities to help identity a particular Domain User. A guid is the best means of uniquely identifing a user within a domain, which combines their userType with username.

DomainUserIds are read-only.

Hierarchy

  • DomainUserId

Index

Constructors

constructor

  • Constructs a DomainUserId from the given user type and username.

    Parameters

    • userType: DomainUserType

      the type of user

    • username: string

      the user's username

    Returns DomainUserId

Properties

userType

userType: DomainUserType

the type of user

username

username: string

the user's username

Methods

equals

  • Returns true if this user is the same as the given user.

    Parameters

    Returns boolean

toGuid

  • toGuid(): string
  • Returns a string GUID for this user guaranteed to be unique within this domain.

    Returns string

anonymous

  • Constructs a "anonymous" DomainUserId by username.

    Parameters

    • username: string

      the anonymous user's unique username.

    Returns DomainUserId

convergence

  • Constructs a "convergence" DomainUserId by username.

    Parameters

    • username: string

      the convergence user's unique username.

    Returns DomainUserId

fromGuid

  • Constructs a DomainUserId from a guid.

    see

    guid

    Parameters

    • guid: string

      the type of user

    Returns DomainUserId

    A new DomainUserId, deserialized from the guid.

guid

  • Constructs a GUID from the given user type and username.

    Equivalent to new DomainUserId(userType, username).toGuid()

    Parameters

    • userType: DomainUserType

      the type of user

    • username: string

      the user's username

    Returns string

normal

  • Constructs a "normal" DomainUserId by username.

    Parameters

    • username: string

      the normal user's unique username

    Returns DomainUserId

of

  • This is a convenience function to construct a DomainUserId from a bare username.

    Parameters

    Returns DomainUserId

toDomainUserId

  • This is a convenience function to construct a DomainUserId from a bare username.

    deprecated

    use of().

    Parameters

    Returns DomainUserId

toDomainUserType

  • Validates a string value is a proper DomainUserType string and returns it. Otherwise will throw and error.

    Parameters

    • typeStr: string

      The type string to validate.

    Returns DomainUserType

    A valid DomainUserType string.