AuthenticationType Énumération
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Spécifie la méthode d’authentification rights management.
public enum class AuthenticationType
public enum AuthenticationType
type AuthenticationType =
Public Enum AuthenticationType
- Héritage
Champs
| Nom | Valeur | Description |
|---|---|---|
| Windows | 0 | Authentification Windows dans un environnement de domaine d’entreprise. |
| Passport | 1 | Windows l’authentification Live ID. |
| WindowsPassport | 2 | Authentification Windows ou Windows authentification Live ID. |
| Internal | 3 | Authentification implicite pour tout utilisateur demandeur. |
Exemples
L’exemple suivant montre également l’utilisation de l’énumération 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
Remarques
AuthenticationType spécifie la façon dont les utilisateurs qui accèdent au contenu géré par les droits doivent être authentifiés.
Internal fournit également l’authentification pour le propriétaire et l’auteur d’un document ou d’un modèle protégé.