/// <summary> /// Log a user on using a secure password. This method uses the default logon provider and /// performs an interactive logon. /// </summary> /// <permission cref="SecurityPermission">This method demands SecurityPermission/ControlPrincipal</permission> public static WindowsIdentity LogOnUser(this NTAccount ntAccount, SecureString password) { return(ntAccount.LogOnUser(password, LogOnType.Interactive, LogOnProvider.Default)); }