asp.net.ph

RolePrincipal Class

System.Web.Security Namespace


.NET Framework version 2.0

Represents security information for the current HTTP request, including role membership. This class cannot be inherited.

RolePrincipal Class Members

Collapse   Constructors

Visibility Constructor Parameters
public RolePrincipal ( IIdentity identity , String encryptedTicket )
public RolePrincipal ( IIdentity identity )
public RolePrincipal ( String providerName , IIdentity identity )
public RolePrincipal ( String providerName , IIdentity identity , String encryptedTicket )

Collapse   Properties

Visibility Name Value Type Accessibility
public CachedListChanged Boolean [ Get ]
public CookiePath String [ Get ]
public Expired Boolean [ Get ]
public ExpireDate DateTime [ Get ]
public Identity IIdentity [ Get ]
public IsRoleListCached Boolean [ Get ]
public IssueDate DateTime [ Get ]
public ProviderName String [ Get ]
public Version Int32 [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
protected GetObjectData ( SerializationInfo info , StreamingContext context ) Void
public GetRoles ( ) String
public IsInRole ( String role ) Boolean
public SetDirty ( ) Void
public ToEncryptedTicket ( ) String

Remarks

The RolePrincipal object implements the IPrincipal interface and represents the current security context for the HTTP request.

When role management is enabled ( see Roles ), the RoleManagerModule assigns a RolePrincipal object to the User property of the current HttpContext.

The RolePrincipal class exposes the security identity for the current HTTP request and additionally performs checks for role membership. If CacheRolesInCookie is true, then the RolePrincipal object manages the cached list of roles and looks up role membership for the current user in the cached list first, then the role Provider. If CacheRolesInCookie is false, the RolePrincipal object always looks up role membership using the role provider.

The RolePrincipal object encrypts and decrypts role information cached in the cookie identified by the CookieName based on the CookieProtectionValue.

See Also

RoleManagerModule Class   RoleProvider Class   RoleProviderCollection Class   Roles Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph