AuthenticationType 枚举

定义

指定权限管理身份验证的方法。

C#
public enum AuthenticationType
继承
AuthenticationType

字段

Internal 3

对所有请求用户执行隐式身份验证。

Passport 1

Windows实时 ID 身份验证。

Windows 0

企业域环境中的Windows 身份验证。

WindowsPassport 2

Windows 身份验证或Windows实时 ID 身份验证。

示例

以下示例还演示了枚举的使用 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

另请参阅