Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Security / FormsIdentity.cs / 1305376 / 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] public 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) { if (ticket == null) throw new ArgumentNullException("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] public 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) { if (ticket == null) throw new ArgumentNullException("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
- FontFamilyConverter.cs
- UserControlBuildProvider.cs
- CapabilitiesSection.cs
- SafeLocalMemHandle.cs
- Trigger.cs
- Slider.cs
- StreamWriter.cs
- RootDesignerSerializerAttribute.cs
- Executor.cs
- ImageAutomationPeer.cs
- webproxy.cs
- EarlyBoundInfo.cs
- DataSourceControlBuilder.cs
- VisualStyleElement.cs
- VarRemapper.cs
- Activity.cs
- MatrixUtil.cs
- DPCustomTypeDescriptor.cs
- NativeMethods.cs
- CustomErrorsSection.cs
- TokenBasedSet.cs
- StaticSiteMapProvider.cs
- ComponentChangedEvent.cs
- URL.cs
- TranslateTransform.cs
- SqlConnectionPoolProviderInfo.cs
- CodeExpressionCollection.cs
- NativeMethodsOther.cs
- AffineTransform3D.cs
- TreeNodeMouseHoverEvent.cs
- TaskFormBase.cs
- RequestCacheEntry.cs
- HtmlAnchor.cs
- OperationGenerator.cs
- TokenBasedSetEnumerator.cs
- PhysicalFontFamily.cs
- EnumDataContract.cs
- XmlArrayItemAttributes.cs
- StateChangeEvent.cs
- Column.cs
- TraceContextRecord.cs
- EncodingTable.cs
- QilLiteral.cs
- RemoteWebConfigurationHost.cs
- InternalResources.cs
- SafeThemeHandle.cs
- DeviceSpecific.cs
- ProcessModuleCollection.cs
- URL.cs
- ResourceContainer.cs
- EntityConnection.cs
- BinaryUtilClasses.cs
- TemplateField.cs
- NamespaceEmitter.cs
- UnionCodeGroup.cs
- StringCollection.cs
- BookmarkEventArgs.cs
- TCEAdapterGenerator.cs
- HandleExceptionArgs.cs
- ADMembershipProvider.cs
- PKCS1MaskGenerationMethod.cs
- ToggleButton.cs
- HeaderCollection.cs
- OrderByQueryOptionExpression.cs
- DataFieldCollectionEditor.cs
- SamlAssertionKeyIdentifierClause.cs
- MethodExpr.cs
- TimeStampChecker.cs
- Button.cs
- PropertyItemInternal.cs
- XmlNodeComparer.cs
- AsnEncodedData.cs
- MSAAEventDispatcher.cs
- FuncCompletionCallbackWrapper.cs
- MessageQueueConverter.cs
- StreamInfo.cs
- ExecutionContext.cs
- ProxyFragment.cs
- SortExpressionBuilder.cs
- DurableOperationAttribute.cs
- Menu.cs
- BaseHashHelper.cs
- InvalidPropValue.cs
- HierarchicalDataTemplate.cs
- RelOps.cs
- SimpleColumnProvider.cs
- PenCursorManager.cs
- QilXmlWriter.cs
- RowBinding.cs
- PolicyLevel.cs
- DecimalConverter.cs
- EdmToObjectNamespaceMap.cs
- PermissionSet.cs
- DescendantQuery.cs
- StructuredProperty.cs
- CopyOnWriteList.cs
- safex509handles.cs
- ImportDesigner.xaml.cs
- serverconfig.cs
- _AcceptOverlappedAsyncResult.cs