ClaimsPrincipal.CreateFromPrincipal Method (IPrincipal)
Creates the appropriate implementation of IClaimsPrincipal based on the type of the specified IPrincipal object or on the type of its underlying identity.
Assembly: Microsoft.IdentityModel (in Microsoft.IdentityModel.dll)
public static function CreateFromPrincipal ( principal : IPrincipal ) : IClaimsPrincipal
A IPrincipal that represents the principal from which to create the claims-based principal.
The DefaultIssuer is used for Windows claims.
Return ValueA IClaimsPrincipal object that represents the new claims-based principal.
The implementation of the IClaimsPrincipal object returned is based on the type of the specified the IPrincipal object or on the type of the identity object returned by its Identity property; for example, a WindowsClaimsPrincipal is returned for a WindowsPrincipal.
Windows claims are associated with the DefaultIssuer.
Target PlatformsWindows 7, Windows Server 2008 R2, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2003 SP2 (32-bit or 64-bit)
Copyright © 2008 by Microsoft Corporation. All rights reserved.