WindowsClaimsIdentity.CreateFromCertificate (Método, (X509Certificate2, Boolean, String))
Initializes an instance of T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity.
Espacio de nombres: Microsoft.IdentityModel.Claims
Ensamblado: Microsoft.IdentityModel (en microsoft.identitymodel.dll)
Uso
Dim certificate As X509Certificate2 Dim useWindowsTokenService As Boolean Dim issuerName As String Dim returnValue As WindowsClaimsIdentity returnValue = WindowsClaimsIdentity.CreateFromCertificate(certificate, useWindowsTokenService, issuerName)
Sintaxis
'Declaración
Public Shared Function CreateFromCertificate ( _
certificate As X509Certificate2, _
useWindowsTokenService As Boolean, _
issuerName As String _
) As WindowsClaimsIdentity
public static WindowsClaimsIdentity CreateFromCertificate (
X509Certificate2 certificate,
bool useWindowsTokenService,
string issuerName
)
public:
static WindowsClaimsIdentity^ CreateFromCertificate (
X509Certificate2^ certificate,
bool useWindowsTokenService,
String^ issuerName
)
public static WindowsClaimsIdentity CreateFromCertificate (
X509Certificate2 certificate,
boolean useWindowsTokenService,
String issuerName
)
public static function CreateFromCertificate (
certificate : X509Certificate2,
useWindowsTokenService : boolean,
issuerName : String
) : WindowsClaimsIdentity
Parámetros
- certificate
The certificate to draw the Upn claim from to use to map to the associated T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity
- useWindowsTokenService
If true this method will an S4U logon will executed in the context of the trusted token service.
- issuerName
The name of the issuer to use for the claims.
Valor devuelto
A T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity representing the user associated with the UPN in the certificate.
Excepciones
Tipo de excepción | Condición |
---|
Notas
If configured, the Windows Token Service will be utilized to ensure that this T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity allows impersonation.
Seguridad para subprocesos
Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para subprocesos.No se garantiza que los miembros de instancias sean seguros para subprocesos.
Plataformas
Plataformas de desarrollo
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Vea también
Referencia
WindowsClaimsIdentity (Clase)
WindowsClaimsIdentity (Miembros)
Microsoft.IdentityModel.Claims (Espacio de nombres)