Initializes an instance of T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity.
Пространство имен: Microsoft.IdentityModel.Claims
Сборка: Microsoft.IdentityModel (в microsoft.identitymodel.dll)
Использование
Visual Basic |
---|
Dim certificate As X509Certificate2 Dim useWindowsTokenService As Boolean Dim issuerName As String Dim returnValue As WindowsClaimsIdentity returnValue = WindowsClaimsIdentity.CreateFromCertificate(certificate, useWindowsTokenService, issuerName) |
Синтаксис
Visual Basic |
---|
Public Shared Function CreateFromCertificate ( _ certificate As X509Certificate2, _ useWindowsTokenService As Boolean, _ issuerName As String _ ) As WindowsClaimsIdentity |
C# |
---|
public static WindowsClaimsIdentity CreateFromCertificate ( X509Certificate2 certificate, bool useWindowsTokenService, string issuerName ) |
C++ |
---|
public: static WindowsClaimsIdentity^ CreateFromCertificate ( X509Certificate2^ certificate, bool useWindowsTokenService, String^ issuerName ) |
J# |
---|
public static WindowsClaimsIdentity CreateFromCertificate ( X509Certificate2 certificate, boolean useWindowsTokenService, String issuerName ) |
JScript |
---|
public static function CreateFromCertificate ( certificate : X509Certificate2, useWindowsTokenService : boolean, issuerName : String ) : WindowsClaimsIdentity |
Параметры
- 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.
Возвращаемое значение
A T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity representing the user associated with the UPN in the certificate.Исключения
Тип исключений | Условие |
---|
Примечания
If configured, the Windows Token Service will be utilized to ensure that this T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity allows impersonation.
Безопасность потоков
Любые открытые статические члены
(Shared в Visual Basic) этого типа являются
поточно-ориентированными.Любые члены экземпляров не являются
гарантированно поточно-ориентированными.