語言

AuthenticationType 列舉

定義

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

public enum class AuthenticationType
public enum AuthenticationType
type AuthenticationType = 
Public Enum AuthenticationType
繼承
AuthenticationType

欄位

名稱 值 Description
Windows 0

企業網域環境中的 Windows 驗證。

Passport 1

Windows Live ID 認證。

WindowsPassport 2

要麼是 Windows 驗證,要麼是 Windows Live ID 認證。

Internal 3

隱含認證給任何請求的使用者。

範例

以下範例也展示了列舉的 AuthenticationType 使用。

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);
    }
}
Dim applicationManifest As String = "<manifest></manifest>"
If File.Exists("rpc.xml") Then
    Dim manifestReader As StreamReader = File.OpenText("rpc.xml")
    applicationManifest = manifestReader.ReadToEnd()
End If

If _secureEnv Is Nothing Then
    If SecureEnvironment.IsUserActivated(New ContentUser(_currentUserId, AuthenticationType.Windows)) Then
        _secureEnv = SecureEnvironment.Create(applicationManifest, New ContentUser(_currentUserId, AuthenticationType.Windows))
    Else
        _secureEnv = SecureEnvironment.Create(applicationManifest, AuthenticationType.Windows, UserActivationMode.Permanent)
    End If
End If

備註

AuthenticationType 規定存取權利管理內容的使用者如何進行認證。

Internal 同時也為受保護文件或範本的擁有者與作者提供認證。

適用於

另請參閱