Méthode ClaimsPrincipal.CreateFromHttpContext (HttpContext, Boolean)
Creates an IClaimsPrincipal from the httpContext.User.
Espace de noms: Microsoft.IdentityModel.Claims
Assembly : Microsoft.IdentityModel (dans microsoft.identitymodel.dll)
Utilisation
Dim httpContext As HttpContext Dim clientCertificateAuthenticationEnabled As Boolean Dim returnValue As IClaimsPrincipal returnValue = ClaimsPrincipal.CreateFromHttpContext(httpContext, clientCertificateAuthenticationEnabled)
Syntaxe
'Déclaration
Public Shared Function CreateFromHttpContext ( _
httpContext As HttpContext, _
clientCertificateAuthenticationEnabled As Boolean _
) As IClaimsPrincipal
public static IClaimsPrincipal CreateFromHttpContext (
HttpContext httpContext,
bool clientCertificateAuthenticationEnabled
)
public:
static IClaimsPrincipal^ CreateFromHttpContext (
HttpContext^ httpContext,
bool clientCertificateAuthenticationEnabled
)
public static IClaimsPrincipal CreateFromHttpContext (
HttpContext httpContext,
boolean clientCertificateAuthenticationEnabled
)
public static function CreateFromHttpContext (
httpContext : HttpContext,
clientCertificateAuthenticationEnabled : boolean
) : IClaimsPrincipal
Paramètres
- httpContext
The httpContext object.
- clientCertificateAuthenticationEnabled
A boolean value that indicates whether the client certificate (if present) in the httpContext must be authenticated.
Valeur de retour
An IClaimsPrincipal.
Exceptions
Type d'exception | Condition |
---|
Cohérence de thread
Tous les membres statiques publics (partagés dans Visual Basic) de ce type sont thread-safe.Il n'est pas garanti que les membres d'instance soient thread-safe.
Plateformes
Plateformes de développement
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Voir aussi
Référence
Classe ClaimsPrincipal
Membres ClaimsPrincipal
Espace de noms Microsoft.IdentityModel.Claims