AuthenticationType 枚举

定义

指定权限管理身份验证的方法。Specifies the method of rights management authentication.

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

字段

Internal 3

对所有请求用户执行隐式身份验证。Implicit authentication to any requesting user.

Passport 1

Windows Live IDWindows Live ID 身份验证。authentication.

Windows 0

公司域环境中的 WindowsWindows 身份验证。WindowsWindows authentication in a corporate domain environment.

WindowsPassport 2

Windows 身份验证或 Windows Live IDWindows Live ID 身份验证。Either Windows authentication or Windows Live IDWindows Live ID authentication.

示例

下面的示例还演示如何使用AuthenticationType枚举。The following example also shows use of the AuthenticationType enumeration.

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指定对访问权限管理内容的用户进行身份验证的方式。AuthenticationType specifies how users who access rights managed content are to be authenticated.

Internal还为受保护的文档或模板的所有者和作者提供身份验证。Internal also provides authentication for the owner and author of a protected document or template.

适用于

另请参阅