Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DLinqDataModelProvider.cs
- RelationshipEndCollection.cs
- CodeRemoveEventStatement.cs
- XmlSiteMapProvider.cs
- DSACryptoServiceProvider.cs
- InputManager.cs
- Splitter.cs
- Console.cs
- AddInDeploymentState.cs
- ExpandableObjectConverter.cs
- UserPreferenceChangingEventArgs.cs
- SafeLibraryHandle.cs
- XPathDocumentBuilder.cs
- Publisher.cs
- TextEndOfParagraph.cs
- CategoryGridEntry.cs
- ConfigurationStrings.cs
- DbCommandTree.cs
- XmlLoader.cs
- FloatSumAggregationOperator.cs
- MarginsConverter.cs
- SqlNodeAnnotations.cs
- HashFinalRequest.cs
- PiiTraceSource.cs
- PrintSystemException.cs
- DynamicValueConverter.cs
- ISAPIRuntime.cs
- shaperfactoryquerycacheentry.cs
- Overlapped.cs
- HwndSourceKeyboardInputSite.cs
- ConsumerConnectionPointCollection.cs
- XsltContext.cs
- DataGridViewAddColumnDialog.cs
- ColorTransform.cs
- CommandManager.cs
- translator.cs
- EmptyImpersonationContext.cs
- Deserializer.cs
- SyndicationDeserializer.cs
- WebPartCancelEventArgs.cs
- itemelement.cs
- TraceHandler.cs
- ListView.cs
- TdsParserSessionPool.cs
- BitmapEffectGroup.cs
- _SslSessionsCache.cs
- BindingContext.cs
- Selector.cs
- ReferentialConstraint.cs
- SAPICategories.cs
- Environment.cs
- XmlQualifiedName.cs
- SystemSounds.cs
- ApplicationServiceManager.cs
- HtmlImage.cs
- FragmentNavigationEventArgs.cs
- XhtmlTextWriter.cs
- DoubleAnimationClockResource.cs
- DeviceContext.cs
- DataRowCollection.cs
- SubtreeProcessor.cs
- EntityWithKeyStrategy.cs
- AsyncPostBackErrorEventArgs.cs
- InvokeProviderWrapper.cs
- DPAPIProtectedConfigurationProvider.cs
- ThreadSafeList.cs
- ToolStripControlHost.cs
- Table.cs
- EntryIndex.cs
- Point.cs
- DragDrop.cs
- DataGridViewTextBoxCell.cs
- WebBrowserPermission.cs
- PropertyRef.cs
- TemplateField.cs
- SqlGenericUtil.cs
- BindToObject.cs
- ItemTypeToolStripMenuItem.cs
- ObjectDataSourceFilteringEventArgs.cs
- ColorTransformHelper.cs
- PreviewKeyDownEventArgs.cs
- Html32TextWriter.cs
- unitconverter.cs
- SEHException.cs
- FormsAuthenticationConfiguration.cs
- DBParameter.cs
- HttpResponseInternalWrapper.cs
- InputDevice.cs
- EntityDataSourceChangingEventArgs.cs
- LineMetrics.cs
- TableProviderWrapper.cs
- MatrixAnimationUsingPath.cs
- BamlLocalizableResourceKey.cs
- PerfService.cs
- ValidationError.cs
- StylusButtonCollection.cs
- TextEditorCopyPaste.cs
- RepeatBehavior.cs
- ObjectParameter.cs
- TableParaClient.cs