Share via


ClaimsPrincipal Members

[Starting with the .NET Framework 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework. The version of WIF addressed by this topic, WIF 3.5, is deprecated and should only be used when developing against the .NET Framework 3.5 SP1 or the .NET Framework 4. For more information about WIF in the .NET Framework 4.5, also known as WIF 4.5, see the Windows Identity Foundation documentation in the .NET Framework 4.5 Development Guide.]

Represents a claims-based principal object.

The following tables list the members exposed by the ClaimsPrincipal type.

Public Constructors

  Name Description
  ClaimsPrincipal Overloaded.  

Top

Public Properties

  Name Description
public propertystatic AnonymousPrincipal Gets a IClaimsPrincipal with a ClaimsIdentity that contains no claims.
public property Identities Gets the collection of claims-based identities associated with this principal.
public property Identity Gets the IIdentity of the current principal.

Top

Public Methods

(see also Protected Methods)

  Name Description
public method Copy Returns a new ClaimsPrincipal object copied from this object.
public methodstatic CreateFromHttpContext Overloaded. Creates an IClaimsPrincipal object from the security context of the specified HTTP request.
public methodstatic CreateFromIdentities Overloaded. Creates an appropriate IClaimsPrincipal object from a collection of claims-based identities.
public methodstatic CreateFromIdentity Overloaded. Creates the appropriate implementation of IClaimsPrincipal based on the type of the specified IIdentity object.
public methodstatic CreateFromPrincipal Overloaded. Creates the appropriate implementation of IClaimsPrincipal based on the type of the specified IPrincipal object.
public method Equals  (Inherited from Object)
public method GetHashCode  (Inherited from Object)
public method GetType  (Inherited from Object)
public method IsInRole Returns a value that indicates whether the principal is in the specified role.
public methodstatic SelectPrimaryIdentity Returns the primary identity from the specified collection of claims-based identities.
public method ToString  (Inherited from Object)

Top

Protected Methods

  Name Description
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)

Top

See Also

Reference

ClaimsPrincipal Class
Microsoft.IdentityModel.Claims Namespace
IClaimsPrincipal

Other Resources

What is Windows Identity Foundation?
Integration with IIdentity and IPrincipal

Copyright © 2008 by Microsoft Corporation. All rights reserved.