Creates an IClaimsPrincipal from the
httpContext.User.
Namespace: Microsoft.IdentityModel.Claims
Assembly: Microsoft.IdentityModel (in
microsoft.identitymodel.dll)
Usage
Visual Basic |
Dim httpContext As HttpContext
Dim clientCertificateAuthenticationEnabled As Boolean
Dim returnValue As IClaimsPrincipal
returnValue = ClaimsPrincipal.CreateFromHttpContext(httpContext, clientCertificateAuthenticationEnabled)
|
Syntax
Visual Basic |
Public Shared Function CreateFromHttpContext ( _
httpContext As HttpContext, _
clientCertificateAuthenticationEnabled As Boolean _
) As IClaimsPrincipal
|
C# |
public static IClaimsPrincipal CreateFromHttpContext (
HttpContext httpContext,
bool clientCertificateAuthenticationEnabled
)
|
C++ |
public:
static IClaimsPrincipal^ CreateFromHttpContext (
HttpContext^ httpContext,
bool clientCertificateAuthenticationEnabled
)
|
J# |
public static IClaimsPrincipal CreateFromHttpContext (
HttpContext httpContext,
boolean clientCertificateAuthenticationEnabled
)
|
JScript |
public static function CreateFromHttpContext (
httpContext : HttpContext,
clientCertificateAuthenticationEnabled : boolean
) : IClaimsPrincipal
|
Parameters
- httpContext
-
The httpContext object.
- clientCertificateAuthenticationEnabled
-
A boolean value that indicates whether the client certificate
(if present) in the httpContext must be authenticated.
Return Value
An IClaimsPrincipal.
Exceptions
Thread Safety
Any public static (Shared in Visual
Basic) members of this type are thread safe. Any instance members
are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
See Also