AuthenticationType Enum

Definition

Anger metoden för rights management-autentisering.

public enum class AuthenticationType
public enum AuthenticationType
type AuthenticationType = 
Public Enum AuthenticationType
Arv
AuthenticationType

Fält

Name Värde Description
Windows 0

Windows authentication i en företagsdomänmiljö.

Passport 1

Windows live-ID-autentisering.

WindowsPassport 2

Antingen Windows authentication eller Windows Live ID-autentisering.

Internal 3

Implicit autentisering till alla begärande användare.

Exempel

I följande exempel visas också användningen av AuthenticationType uppräkningen.

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

Kommentarer

AuthenticationType anger hur användare som har åtkomst till rättighetshanterat innehåll ska autentiseras.

Internal tillhandahåller också autentisering för ägaren och författaren till ett skyddat dokument eller en skyddad mall.

Gäller för

Se även