AuthenticationType 列舉

定義

指定權限管理驗證的方法。

C#
public enum AuthenticationType
繼承
AuthenticationType

欄位

Internal 3

任何要求使用者的隱含驗證。

Passport 1

Windows即時識別碼驗證。

Windows 0

公司網域環境中的Windows 驗證。

WindowsPassport 2

Windows 驗證或Windows即時識別碼驗證。

範例

下列範例也會示範列舉的使用 AuthenticationType

C#
string applicationManifest = "<manifest></manifest>";
if (File.Exists("rpc.xml"))
{
    StreamReader manifestReader = File.OpenText("rpc.xml");
    applicationManifest = manifestReader.ReadToEnd();
}

if (_secureEnv == null)
{
    if (SecureEnvironment.IsUserActivated(new ContentUser(
                _currentUserId, AuthenticationType.Windows)))
    {
        _secureEnv = SecureEnvironment.Create(
            applicationManifest, new ContentUser(
                _currentUserId, AuthenticationType.Windows));
    }
    else
    {
        _secureEnv = SecureEnvironment.Create(
            applicationManifest,
            AuthenticationType.Windows,
            UserActivationMode.Permanent);
    }
}

備註

AuthenticationType 會指定如何驗證存取權限受管理內容的使用者。

Internal 也提供受保護檔或範本擁有者和作者的驗證。

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另請參閱