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
- PageAdapter.cs
- HostedHttpContext.cs
- NameValuePermission.cs
- DataPagerCommandEventArgs.cs
- ResXResourceWriter.cs
- BuiltInExpr.cs
- XmlSchemaRedefine.cs
- GeneratedCodeAttribute.cs
- WebPartConnectionsEventArgs.cs
- FixedLineResult.cs
- Base64Stream.cs
- IDataContractSurrogate.cs
- DataQuery.cs
- SmiTypedGetterSetter.cs
- XmlNamespaceMapping.cs
- DeleteHelper.cs
- OrderByExpression.cs
- ThreadPool.cs
- FileChangesMonitor.cs
- CodeLabeledStatement.cs
- ObjectListCommandCollection.cs
- RelatedView.cs
- HttpSessionStateBase.cs
- DecimalConverter.cs
- LocalizableResourceBuilder.cs
- UrlAuthorizationModule.cs
- ConsoleCancelEventArgs.cs
- TransformedBitmap.cs
- ObjectDataSourceSelectingEventArgs.cs
- KnownTypeAttribute.cs
- PopOutPanel.cs
- Point3DCollectionValueSerializer.cs
- EventPrivateKey.cs
- UndirectedGraph.cs
- PartitionerStatic.cs
- ChtmlCalendarAdapter.cs
- CookielessHelper.cs
- ObjectQuery_EntitySqlExtensions.cs
- EditingCommands.cs
- MonthCalendar.cs
- ResXResourceSet.cs
- RoleManagerModule.cs
- ChangeInterceptorAttribute.cs
- XdrBuilder.cs
- ConfigurationPropertyAttribute.cs
- PersonalizationProvider.cs
- HostProtectionException.cs
- SecurityResources.cs
- XmlDesigner.cs
- XMLUtil.cs
- httpserverutility.cs
- TableRowGroup.cs
- DrawingVisual.cs
- Command.cs
- ReadOnlyDictionary.cs
- TextSelectionHighlightLayer.cs
- InputDevice.cs
- EnumBuilder.cs
- TrackingMemoryStream.cs
- ContextStaticAttribute.cs
- Encoding.cs
- DbProviderSpecificTypePropertyAttribute.cs
- AuthorizationRuleCollection.cs
- GenericNameHandler.cs
- XamlStyleSerializer.cs
- ComplexObject.cs
- CqlParserHelpers.cs
- ISAPIApplicationHost.cs
- RawStylusActions.cs
- OdbcEnvironmentHandle.cs
- BufferedOutputStream.cs
- KeyConstraint.cs
- Rect3DConverter.cs
- EventMappingSettingsCollection.cs
- InputMethodStateChangeEventArgs.cs
- EdmRelationshipRoleAttribute.cs
- DecimalConverter.cs
- DesignerAdRotatorAdapter.cs
- ProtocolsConfiguration.cs
- PreservationFileWriter.cs
- Type.cs
- HttpResponseHeader.cs
- Cursor.cs
- XmlSchemas.cs
- OracleParameterBinding.cs
- CustomTypeDescriptor.cs
- CodeExpressionStatement.cs
- CodeCastExpression.cs
- TemplateControlCodeDomTreeGenerator.cs
- ControlCollection.cs
- ListViewInsertEventArgs.cs
- CodeTypeDeclarationCollection.cs
- embossbitmapeffect.cs
- DBNull.cs
- BaseResourcesBuildProvider.cs
- SchemaImporterExtension.cs
- InternalMappingException.cs
- SingleAnimation.cs
- Point4D.cs
- FrameworkContentElement.cs