Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Security / WindowsAuthenticationEventArgs.cs / 1305376 / WindowsAuthenticationEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* WindowsAuthenticationEventArgs class
*
* Copyright (c) 1999 Microsoft Corporation
*/
namespace System.Web.Security {
using System.Security.Principal;
using System.Security.Permissions;
///
/// The Windows authentication module raises this event. This
/// is the event argument passed to the WindowsAuthentication_OnAuthenticate event.
/// Contains a WindowsIdentity object and the IPrincipal object used for the context.
///
public sealed class WindowsAuthenticationEventArgs : EventArgs {
private IPrincipal _User;
private HttpContext _Context;
private WindowsIdentity _Identity;
///
/// IPrincipal object to be associated with the request.
///
/// The user object should be attached
/// to the context.
/// If User is non null
/// and Context.User is null, the WindowsAuthenticationModule will initialize
/// Context.User with WindowsAuthenticationEventArgs.User.
///
public IPrincipal User {
get { return _User;}
[SecurityPermission(SecurityAction.Demand, ControlPrincipal=true)]
set {
_User = value;
}
}
///
/// The HttpContext intrinsic (provides access to
/// Request, Response, and User objects).
///
public HttpContext Context { get { return _Context;}}
///
/// An authenticated Windows identity.
///
public WindowsIdentity Identity { get { return _Identity;}}
///
/// Initializes a newly created instance of the
/// WindowsAuthenticationEventArgs Class.
///
public WindowsAuthenticationEventArgs(WindowsIdentity identity, HttpContext context) {
_Identity = identity;
_Context = context;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* WindowsAuthenticationEventArgs class
*
* Copyright (c) 1999 Microsoft Corporation
*/
namespace System.Web.Security {
using System.Security.Principal;
using System.Security.Permissions;
///
/// The Windows authentication module raises this event. This
/// is the event argument passed to the WindowsAuthentication_OnAuthenticate event.
/// Contains a WindowsIdentity object and the IPrincipal object used for the context.
///
public sealed class WindowsAuthenticationEventArgs : EventArgs {
private IPrincipal _User;
private HttpContext _Context;
private WindowsIdentity _Identity;
///
/// IPrincipal object to be associated with the request.
///
/// The user object should be attached
/// to the context.
/// If User is non null
/// and Context.User is null, the WindowsAuthenticationModule will initialize
/// Context.User with WindowsAuthenticationEventArgs.User.
///
public IPrincipal User {
get { return _User;}
[SecurityPermission(SecurityAction.Demand, ControlPrincipal=true)]
set {
_User = value;
}
}
///
/// The HttpContext intrinsic (provides access to
/// Request, Response, and User objects).
///
public HttpContext Context { get { return _Context;}}
///
/// An authenticated Windows identity.
///
public WindowsIdentity Identity { get { return _Identity;}}
///
/// Initializes a newly created instance of the
/// WindowsAuthenticationEventArgs Class.
///
public WindowsAuthenticationEventArgs(WindowsIdentity identity, HttpContext context) {
_Identity = identity;
_Context = context;
}
}
}
// 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
- Point.cs
- XmlWellformedWriter.cs
- WebPartConnectionsCancelVerb.cs
- FolderBrowserDialog.cs
- _ScatterGatherBuffers.cs
- LineServices.cs
- SequentialOutput.cs
- TextServicesLoader.cs
- AtomEntry.cs
- FormViewDesigner.cs
- StatusBar.cs
- WindowsMenu.cs
- UIElementAutomationPeer.cs
- SmtpDigestAuthenticationModule.cs
- LambdaCompiler.Statements.cs
- GridViewRowCollection.cs
- SQLInt32.cs
- IndentedTextWriter.cs
- InfoCardConstants.cs
- OracleParameterBinding.cs
- WebReferencesBuildProvider.cs
- SQLByte.cs
- ObjectDataSourceSelectingEventArgs.cs
- TextDecorationCollectionConverter.cs
- GrammarBuilderRuleRef.cs
- NullReferenceException.cs
- GeneralTransform3D.cs
- ProvidersHelper.cs
- LinqDataSourceValidationException.cs
- KeyPressEvent.cs
- IndicShape.cs
- Helper.cs
- MemberAccessException.cs
- StringFunctions.cs
- SwitchAttribute.cs
- ProxyWebPart.cs
- ConfigurationElement.cs
- GroupBox.cs
- ByteAnimationUsingKeyFrames.cs
- CalculatedColumn.cs
- WorkflowTraceTransfer.cs
- PageCatalogPartDesigner.cs
- TraceContextEventArgs.cs
- XmlBoundElement.cs
- COM2PropertyDescriptor.cs
- ScaleTransform.cs
- HtmlControl.cs
- ISCIIEncoding.cs
- CodeGroup.cs
- CategoryEditor.cs
- Compiler.cs
- MessageBox.cs
- ResourceBinder.cs
- UrlMapping.cs
- ExpressionPrinter.cs
- FormViewPagerRow.cs
- FontStretch.cs
- Preprocessor.cs
- ControllableStoryboardAction.cs
- translator.cs
- SafeThemeHandle.cs
- CacheEntry.cs
- CodeExporter.cs
- WinEventHandler.cs
- ExpressionLexer.cs
- CodeGotoStatement.cs
- CodeAttachEventStatement.cs
- DataErrorValidationRule.cs
- KeyNotFoundException.cs
- Stack.cs
- RegexStringValidator.cs
- DataBoundControl.cs
- PersonalizationEntry.cs
- ViewSimplifier.cs
- DoubleAnimationBase.cs
- InfoCardSymmetricCrypto.cs
- Quaternion.cs
- AddInSegmentDirectoryNotFoundException.cs
- WindowsComboBox.cs
- BinaryObjectInfo.cs
- TabOrder.cs
- StorageEntitySetMapping.cs
- SafeSecurityHandles.cs
- LabelDesigner.cs
- TaskFileService.cs
- TypeExtensionConverter.cs
- MenuItemBindingCollection.cs
- MarkupCompiler.cs
- HtmlSelectionListAdapter.cs
- DataControlFieldTypeEditor.cs
- TextBox.cs
- CodeGen.cs
- ObjectTokenCategory.cs
- mediaclock.cs
- SimpleTypesSurrogate.cs
- PixelFormats.cs
- OpenFileDialog.cs
- TableColumn.cs
- JavaScriptString.cs
- InputEventArgs.cs