Skip to content

SecurityPrincipalExtensions

Extracts the account name and domain portions from an IIdentity's Name (typically a Windows identity in DOMAIN\user form). (BR-071)

Purpose

  • Extracts the account name and domain portions from an IIdentity's Name (typically a Windows identity in DOMAIN\user form). (BR-071)

Context

  • Namespace: SAIF.Common.Extensions
  • Assembly/package: SAIF.Framework.Common

Public members

Member Signature Purpose
UserId(this IIdentity identity) public static string UserId(this IIdentity identity) Returns the account-name portion following the domain separator, if present. (BR-071)
Domain(this IIdentity identity) public static string Domain(this IIdentity identity) Returns the domain portion preceding the separator, or empty when the name is unqualified. (BR-071)

Sources

  • Common/SAIF.Common/Extensions/SecurityPrincipalExtensions.cs