Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Security / FormsIdentity.cs / 1 / FormsIdentity.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* FormsIdentity
*
* Copyright (c) 1999 Microsoft Corporation
*/
namespace System.Web.Security {
using System.Security.Principal;
using System.Security.Permissions;
///
/// This class is an IIdentity derived class
/// used by FormsAuthenticationModule. It provides a way for an application to
/// access the cookie authentication ticket.
///
[Serializable]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class FormsIdentity : IIdentity {
///
/// The name of the identity (in this case, the
/// passport user name).
///
public String Name { get { return _Ticket.Name;}}
///
/// The type of the identity (in this case,
/// "Forms").
///
public String AuthenticationType { get { return "Forms";}}
///
/// Indicates whether or not authentication took
/// place.
///
public bool IsAuthenticated { get { return true;}}
///
/// Returns the FormsAuthenticationTicket
/// associated with the current request.
///
public FormsAuthenticationTicket Ticket { get { return _Ticket;}}
///
/// Constructor.
///
public FormsIdentity (FormsAuthenticationTicket ticket) {
_Ticket = ticket;
}
private FormsAuthenticationTicket _Ticket;
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- filewebrequest.cs
- BindingCompleteEventArgs.cs
- SiteOfOriginContainer.cs
- TextAction.cs
- LayoutExceptionEventArgs.cs
- NGCUIElementCollectionSerializerAsync.cs
- DesignerOptions.cs
- CriticalFileToken.cs
- PersonalizablePropertyEntry.cs
- RootBrowserWindow.cs
- PropertyPathWorker.cs
- OpenTypeLayoutCache.cs
- FrameDimension.cs
- HyperLink.cs
- StrokeNodeEnumerator.cs
- Stopwatch.cs
- MeshGeometry3D.cs
- DataServiceRequest.cs
- AncillaryOps.cs
- OleDbParameterCollection.cs
- TreeNodeEventArgs.cs
- InvokeWebServiceDesigner.cs
- QueryOperationResponseOfT.cs
- PingReply.cs
- CodeDomConfigurationHandler.cs
- PolyQuadraticBezierSegment.cs
- shaperfactory.cs
- ProfilePropertySettingsCollection.cs
- PromptEventArgs.cs
- StrokeNodeOperations.cs
- MouseOverProperty.cs
- WebPartEditVerb.cs
- Label.cs
- HandlerMappingMemo.cs
- InputElement.cs
- DataListItemCollection.cs
- StringToken.cs
- CreateUserWizardStep.cs
- activationcontext.cs
- RuleConditionDialog.Designer.cs
- PlatformCulture.cs
- WebBrowserEvent.cs
- ClientRolePrincipal.cs
- XmlSerializerOperationFormatter.cs
- MTConfigUtil.cs
- CutCopyPasteHelper.cs
- NameScope.cs
- SoapCodeExporter.cs
- ButtonStandardAdapter.cs
- ForeignKeyConstraint.cs
- SequenceFullException.cs
- DataGridViewAutoSizeModeEventArgs.cs
- cookiecollection.cs
- ToolStripGripRenderEventArgs.cs
- UndoManager.cs
- SqlProviderManifest.cs
- ApplicationActivator.cs
- CharAnimationBase.cs
- ProjectedWrapper.cs
- StateChangeEvent.cs
- Column.cs
- ImageKeyConverter.cs
- JsonObjectDataContract.cs
- ObjectListComponentEditor.cs
- RoleManagerModule.cs
- TraceData.cs
- SevenBitStream.cs
- WebFormsRootDesigner.cs
- ObjectRef.cs
- BezierSegment.cs
- ParserContext.cs
- NetNamedPipeSecurityMode.cs
- HtmlGenericControl.cs
- ConnectionPointGlyph.cs
- EventLogEntryCollection.cs
- LocationEnvironment.cs
- SqlErrorCollection.cs
- KeyValueConfigurationCollection.cs
- FileSystemWatcher.cs
- FlowDocumentPage.cs
- XmlDataProvider.cs
- CodeIdentifiers.cs
- Main.cs
- StorageTypeMapping.cs
- XmlHierarchicalEnumerable.cs
- OrderablePartitioner.cs
- StreamAsIStream.cs
- DetailsViewDeleteEventArgs.cs
- TreeViewEvent.cs
- StandardToolWindows.cs
- SerializationObjectManager.cs
- InstanceHandle.cs
- LocalTransaction.cs
- Mapping.cs
- Point3DCollectionConverter.cs
- Transform3DGroup.cs
- CustomCategoryAttribute.cs
- UIPermission.cs
- FaultCallbackWrapper.cs
- Task.cs