Show / Hide Table of Contents

Class SimplePrincipal

Simple IPrincipal implementation that extends GenericPrincipal, implementing only Equals and GetHashCode. For hash code generation and equality comparison, SimplePrincipal uses only the Identity.Name property.

Inheritance
object
ClaimsPrincipal
GenericPrincipal
SimplePrincipal
Implements
IPrincipal
Inherited Members
GenericPrincipal.IsInRole(string)
GenericPrincipal.Identity
ClaimsPrincipal.AddIdentities(IEnumerable<ClaimsIdentity>)
ClaimsPrincipal.AddIdentity(ClaimsIdentity)
ClaimsPrincipal.Clone()
ClaimsPrincipal.CreateClaimsIdentity(BinaryReader)
ClaimsPrincipal.FindAll(Predicate<Claim>)
ClaimsPrincipal.FindAll(string)
ClaimsPrincipal.FindFirst(Predicate<Claim>)
ClaimsPrincipal.FindFirst(string)
ClaimsPrincipal.GetObjectData(SerializationInfo, StreamingContext)
ClaimsPrincipal.HasClaim(Predicate<Claim>)
ClaimsPrincipal.HasClaim(string, string)
ClaimsPrincipal.WriteTo(BinaryWriter)
ClaimsPrincipal.WriteTo(BinaryWriter, byte[])
ClaimsPrincipal.Claims
ClaimsPrincipal.ClaimsPrincipalSelector
ClaimsPrincipal.Current
ClaimsPrincipal.CustomSerializationData
ClaimsPrincipal.Identities
ClaimsPrincipal.PrimaryIdentitySelector
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.Net.Security.Impl
Assembly: Coherence.dll
Syntax
public class SimplePrincipal : GenericPrincipal, IPrincipal

Constructors

SimplePrincipal(IIdentity, string[])

Constructor

Declaration
public SimplePrincipal(IIdentity id, string[] roles)
Parameters
Type Name Description
IIdentity id

IIdentity a generic user representation.

string[] roles

A list of roles to which the user represented by IIdentity belongs.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if obj is a SimplePrincipal and its Identity.Name matches that of the current object. false otherwise.

Overrides
object.Equals(object)

GetHashCode()

Obtain the hashcode for this object.

Declaration
public override int GetHashCode()
Returns
Type Description
int

The integer hashcode of the Identity.Name property.

Overrides
object.GetHashCode()

Implements

IPrincipal
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.