Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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.
//------------------------------------------------------------------------------
//
// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SizeLimitedCache.cs
- MultiBinding.cs
- PerspectiveCamera.cs
- NativeMethods.cs
- SqlDataSourceCustomCommandPanel.cs
- WebPartHelpVerb.cs
- ExceptionUtil.cs
- CssClassPropertyAttribute.cs
- StylusButtonEventArgs.cs
- HtmlEncodedRawTextWriter.cs
- Size.cs
- ReadOnlyActivityGlyph.cs
- SByte.cs
- LogicalExpressionTypeConverter.cs
- MenuItemStyleCollection.cs
- IndicFontClient.cs
- ControlCodeDomSerializer.cs
- ToolStripManager.cs
- DataSysAttribute.cs
- LogPolicy.cs
- FormatVersion.cs
- AttachedAnnotationChangedEventArgs.cs
- PackageDigitalSignature.cs
- Overlapped.cs
- DateTimeFormatInfoScanner.cs
- Hash.cs
- InstanceCreationEditor.cs
- QilIterator.cs
- ActivityBindForm.Designer.cs
- EventSourceCreationData.cs
- ComponentManagerBroker.cs
- PackageRelationshipCollection.cs
- TraceSection.cs
- DataFormat.cs
- Positioning.cs
- XmlIlVisitor.cs
- CodeSubDirectoriesCollection.cs
- BoundPropertyEntry.cs
- ZipIORawDataFileBlock.cs
- ProtocolReflector.cs
- InheritablePropertyChangeInfo.cs
- PropertySourceInfo.cs
- PeerContact.cs
- SqlDataSourceStatusEventArgs.cs
- PanelStyle.cs
- LambdaCompiler.ControlFlow.cs
- UIElementParaClient.cs
- SmtpException.cs
- MatrixStack.cs
- ReadOnlyObservableCollection.cs
- Site.cs
- LinqDataSource.cs
- ExpressionEditorAttribute.cs
- OleAutBinder.cs
- PartBasedPackageProperties.cs
- CompositeScriptReference.cs
- SelectionItemPattern.cs
- ShapeTypeface.cs
- BitmapSourceSafeMILHandle.cs
- FieldAccessException.cs
- TTSEvent.cs
- HierarchicalDataTemplate.cs
- LinqDataSourceDeleteEventArgs.cs
- JsonFormatReaderGenerator.cs
- SelfIssuedTokenFactoryCredential.cs
- WebHttpBindingCollectionElement.cs
- ToolStripPanel.cs
- Binding.cs
- CodeArrayCreateExpression.cs
- SqlStatistics.cs
- EncoderParameter.cs
- XmlDataDocument.cs
- EpmContentSerializer.cs
- ByteStreamGeometryContext.cs
- MimeReflector.cs
- PlanCompiler.cs
- RequestChannelBinder.cs
- LogLogRecord.cs
- TriggerActionCollection.cs
- ToolStripHighContrastRenderer.cs
- KeyedByTypeCollection.cs
- UserMapPath.cs
- DataGridViewCellMouseEventArgs.cs
- CodeEntryPointMethod.cs
- TextLineBreak.cs
- DataControlLinkButton.cs
- FormViewInsertedEventArgs.cs
- CustomBindingElement.cs
- InfoCardXmlSerializer.cs
- ArgumentReference.cs
- ObjectTypeMapping.cs
- FastEncoderWindow.cs
- TextTreePropertyUndoUnit.cs
- TextTreeTextNode.cs
- InnerItemCollectionView.cs
- AdornerHitTestResult.cs
- TextTreeInsertUndoUnit.cs
- ColorConverter.cs
- MailWebEventProvider.cs
- HyperLinkField.cs