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
- Reference.cs
- UICuesEvent.cs
- TracedNativeMethods.cs
- EndSelectCardRequest.cs
- TemplateNodeContextMenu.cs
- WpfSharedBamlSchemaContext.cs
- ConnectionsZoneDesigner.cs
- OrderedEnumerableRowCollection.cs
- ScriptResourceInfo.cs
- InternalEnumValidatorAttribute.cs
- MultiBinding.cs
- XmlUtilWriter.cs
- AllowedAudienceUriElement.cs
- VisualBasicSettings.cs
- RowTypeElement.cs
- _NetworkingPerfCounters.cs
- HttpException.cs
- ImpersonationContext.cs
- FastEncoderWindow.cs
- ProcessManager.cs
- SecurityDescriptor.cs
- StringValueConverter.cs
- DynamicResourceExtensionConverter.cs
- Input.cs
- SHA384Cng.cs
- RelationalExpressions.cs
- Msec.cs
- FontFaceLayoutInfo.cs
- DbProviderConfigurationHandler.cs
- FixedElement.cs
- FixedSOMSemanticBox.cs
- IPAddressCollection.cs
- Assembly.cs
- ConnectionManagementElement.cs
- TypeCodeDomSerializer.cs
- QuaternionAnimationBase.cs
- _UriSyntax.cs
- CharacterBuffer.cs
- ExtendedProperty.cs
- DataView.cs
- ColumnMapTranslator.cs
- SystemInfo.cs
- UrlPropertyAttribute.cs
- SingleAnimationUsingKeyFrames.cs
- TextTreeInsertUndoUnit.cs
- DataObject.cs
- FixedTextPointer.cs
- ICspAsymmetricAlgorithm.cs
- TextPatternIdentifiers.cs
- ColorMatrix.cs
- PrintDocument.cs
- XmlTypeMapping.cs
- IPEndPointCollection.cs
- SqlBulkCopyColumnMappingCollection.cs
- MobileSysDescriptionAttribute.cs
- DbModificationClause.cs
- TextRangeEdit.cs
- DataBindingCollectionConverter.cs
- HighlightVisual.cs
- SqlFlattener.cs
- Aggregates.cs
- DeflateEmulationStream.cs
- PreservationFileReader.cs
- DetailsViewPagerRow.cs
- SRef.cs
- Pen.cs
- MetadataSerializer.cs
- PropertyManager.cs
- _NegotiateClient.cs
- COAUTHIDENTITY.cs
- CopyOnWriteList.cs
- EncryptedType.cs
- TableRowCollection.cs
- ExplicitDiscriminatorMap.cs
- PeerNameResolver.cs
- QilTargetType.cs
- SchemaImporter.cs
- UrlPath.cs
- ClearTypeHintValidation.cs
- Stylesheet.cs
- FramingFormat.cs
- SpecularMaterial.cs
- ConsumerConnectionPoint.cs
- DeferredRunTextReference.cs
- XmlAutoDetectWriter.cs
- TextParagraphProperties.cs
- DataTemplateSelector.cs
- TypeDescriptorContext.cs
- EmptyEnumerator.cs
- AsyncPostBackTrigger.cs
- TextContainerChangedEventArgs.cs
- Error.cs
- DefaultAssemblyResolver.cs
- StringToken.cs
- SQLInt32Storage.cs
- CustomAttributeBuilder.cs
- RuntimeUtils.cs
- ExpressionBindingsDialog.cs
- CriticalHandle.cs
- OrderedDictionaryStateHelper.cs