Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BooleanAnimationUsingKeyFrames.cs
- _SSPIWrapper.cs
- CachedBitmap.cs
- Timer.cs
- EntryPointNotFoundException.cs
- TypeToArgumentTypeConverter.cs
- EUCJPEncoding.cs
- ListBoxDesigner.cs
- BasicHttpSecurityMode.cs
- WindowInteractionStateTracker.cs
- PeerInvitationResponse.cs
- AudioSignalProblemOccurredEventArgs.cs
- ViewKeyConstraint.cs
- RequestSecurityTokenResponse.cs
- WorkflowInstanceExtensionCollection.cs
- XmlIterators.cs
- WebPartConnectionsCloseVerb.cs
- AlignmentYValidation.cs
- InkCanvasInnerCanvas.cs
- XmlSchemaAnyAttribute.cs
- CompilerError.cs
- TextRunProperties.cs
- PresentationAppDomainManager.cs
- ContentType.cs
- ButtonChrome.cs
- RichTextBoxDesigner.cs
- ObjectStateManager.cs
- VariantWrapper.cs
- SqlProfileProvider.cs
- BoundPropertyEntry.cs
- RenderData.cs
- InvalidCardException.cs
- XsltContext.cs
- FixedSOMLineRanges.cs
- DataGridColumnDropSeparator.cs
- BuildTopDownAttribute.cs
- ProtocolState.cs
- PassportIdentity.cs
- SqlClientWrapperSmiStreamChars.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DataGridColumnsPage.cs
- EntityDataSourceStatementEditor.cs
- counter.cs
- FacetDescriptionElement.cs
- CharKeyFrameCollection.cs
- DataKey.cs
- DateTimeOffsetStorage.cs
- DerivedKeySecurityTokenStub.cs
- ManipulationStartingEventArgs.cs
- SR.cs
- TrackBarRenderer.cs
- ObjectDataSourceChooseMethodsPanel.cs
- BindingElementExtensionElement.cs
- remotingproxy.cs
- MetabaseServerConfig.cs
- ThemeDirectoryCompiler.cs
- SafeNativeMethods.cs
- AttributeSetAction.cs
- Table.cs
- FormsAuthenticationTicket.cs
- SqlXmlStorage.cs
- ListViewHitTestInfo.cs
- OdbcUtils.cs
- DelayedRegex.cs
- ISAPIWorkerRequest.cs
- _SSPISessionCache.cs
- WinFormsSecurity.cs
- BooleanKeyFrameCollection.cs
- XmlHierarchicalDataSourceView.cs
- ReadContentAsBinaryHelper.cs
- RedistVersionInfo.cs
- InkCanvasSelectionAdorner.cs
- XPathDocumentNavigator.cs
- SerializationSectionGroup.cs
- HuffCodec.cs
- DragAssistanceManager.cs
- StringConcat.cs
- ZipArchive.cs
- EqualityComparer.cs
- TranslateTransform.cs
- CatalogZoneBase.cs
- RootBrowserWindow.cs
- SafeNativeMethods.cs
- SqlProfileProvider.cs
- WebPartEditorOkVerb.cs
- ConsumerConnectionPointCollection.cs
- HttpRequest.cs
- TextServicesLoader.cs
- PagedControl.cs
- WpfSharedBamlSchemaContext.cs
- SizeConverter.cs
- filewebrequest.cs
- InternalRelationshipCollection.cs
- UriSection.cs
- XmlAggregates.cs
- DeviceSpecificChoice.cs
- PassportAuthentication.cs
- ScriptRegistrationManager.cs
- LineGeometry.cs
- QilExpression.cs