Identity Class
Represents the identity of a principal. The identity is a name plus any associated claims. The identity is immutable.
Syntax
public abstract class Identity : MarshalByRefObject, System.Security.Principal.IIdentity
Remarks
The Identity class is the base class for all identity classes. It represents the name of a principal and any associated claims. The identity is immutable, meaning that once it is created, its properties cannot be changed.
The Identity class implements the IIdentity interface, which defines the common properties and methods for all identity classes. These include the Name property, which returns the name of the principal, and the IsAuthenticated property, which indicates whether the principal has been authenticated.
The Identity class is an abstract class, meaning that it cannot be instantiated directly. Instead, you must derive from it to create a concrete identity class. Common derived classes include WindowsIdentity, which represents the identity of a Windows user, and GenericIdentity, which represents a generic identity.
Table of Contents
Properties
AuthenticationType
Gets the type of authentication used to get the identity.
public abstract string AuthenticationType { get; }
IsAuthenticated
Gets a value that indicates whether the current principal has been authenticated.
public abstract bool IsAuthenticated { get; }
Methods
Dispose
Releases the unmanaged resources that are used by the current instance of the Identity class and, optionally, releases the managed resources.
public void Dispose();
Equals
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj);
Inherited Members
This class inherits members from the following base classes:
System.MarshalByRefObject
This class implements interfaces:
System.Security.Principal.IIdentity
System.IDisposable