Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / SspiNegotiationTokenAuthenticatorState.cs / 1 / SspiNegotiationTokenAuthenticatorState.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Security
{
using System.IdentityModel.Claims;
using System.ServiceModel;
using System.IdentityModel.Policy;
using System.Security.Principal;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Collections.Generic;
using System.ServiceModel.Channels;
using System.Runtime.Serialization;
using System.Net;
using System.Diagnostics;
class SspiNegotiationTokenAuthenticatorState : NegotiationTokenAuthenticatorState
{
ISspiNegotiation sspiNegotiation;
HashAlgorithm negotiationDigest;
string context;
int requestedKeySize;
EndpointAddress appliesTo;
DataContractSerializer appliesToSerializer;
public SspiNegotiationTokenAuthenticatorState(ISspiNegotiation sspiNegotiation)
: base()
{
if (sspiNegotiation == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("sspiNegotiation");
}
this.sspiNegotiation = sspiNegotiation;
this.negotiationDigest = CryptoHelper.NewSha1HashAlgorithm();
}
public ISspiNegotiation SspiNegotiation
{
get
{
return this.sspiNegotiation;
}
}
internal int RequestedKeySize
{
get
{
return this.requestedKeySize;
}
set
{
this.requestedKeySize = value;
}
}
internal HashAlgorithm NegotiationDigest
{
get
{
return this.negotiationDigest;
}
}
internal string Context
{
get
{
return this.context;
}
set
{
this.context = value;
}
}
internal EndpointAddress AppliesTo
{
get
{
return this.appliesTo;
}
set
{
this.appliesTo = value;
}
}
internal DataContractSerializer AppliesToSerializer
{
get
{
return this.appliesToSerializer;
}
set
{
this.appliesToSerializer = value;
}
}
public override string GetRemoteIdentityName()
{
if (this.sspiNegotiation != null && !this.IsNegotiationCompleted)
{
return this.sspiNegotiation.GetRemoteIdentityName();
}
return base.GetRemoteIdentityName();
}
public override void Dispose()
{
try
{
lock (ThisLock)
{
if (this.sspiNegotiation != null)
{
this.sspiNegotiation.Dispose();
}
if (this.negotiationDigest != null)
{
((IDisposable)this.negotiationDigest).Dispose();
}
}
}
finally
{
base.Dispose();
}
}
}
}
// 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
- TableLayoutStyleCollection.cs
- TagNameToTypeMapper.cs
- PeerNameRegistration.cs
- TranslateTransform.cs
- ReliabilityContractAttribute.cs
- NetTcpBinding.cs
- ResourceDefaultValueAttribute.cs
- Margins.cs
- ImpersonationContext.cs
- AutomationPropertyInfo.cs
- MetadataSource.cs
- QilValidationVisitor.cs
- HijriCalendar.cs
- MobileControl.cs
- ValueTable.cs
- FileRegion.cs
- ExtensionSurface.cs
- NameTable.cs
- InvalidPipelineStoreException.cs
- ServicePointManagerElement.cs
- DesignerAutoFormatStyle.cs
- NativeRightsManagementAPIsStructures.cs
- FlowDocumentFormatter.cs
- ContentDisposition.cs
- SqlProfileProvider.cs
- WebPartMenuStyle.cs
- DSASignatureDeformatter.cs
- ExtensionFile.cs
- OuterGlowBitmapEffect.cs
- IndicFontClient.cs
- WebBrowserUriTypeConverter.cs
- BooleanExpr.cs
- DataObjectAttribute.cs
- RadioButtonAutomationPeer.cs
- TextMetrics.cs
- SafeEventHandle.cs
- ComplexPropertyEntry.cs
- SettingsBindableAttribute.cs
- InputMethod.cs
- sqlmetadatafactory.cs
- DbDataReader.cs
- WindowInteractionStateTracker.cs
- BitmapInitialize.cs
- ColumnWidthChangingEvent.cs
- ProviderSettingsCollection.cs
- HyperLinkStyle.cs
- ContextMenu.cs
- ITextView.cs
- XmlTextWriter.cs
- NumberSubstitution.cs
- MatrixAnimationUsingPath.cs
- TransactionScope.cs
- DataContract.cs
- EnumConverter.cs
- Color.cs
- EventLogPermissionAttribute.cs
- ComponentRenameEvent.cs
- Globals.cs
- IsolatedStorageException.cs
- HMAC.cs
- WebException.cs
- SyndicationCategory.cs
- DependencyPropertyKey.cs
- Exceptions.cs
- ListControlConvertEventArgs.cs
- SBCSCodePageEncoding.cs
- Button.cs
- ResourceAttributes.cs
- SqlReorderer.cs
- ComboBoxHelper.cs
- RoleServiceManager.cs
- ContentType.cs
- TreeWalker.cs
- DeviceSpecificChoiceCollection.cs
- OutOfMemoryException.cs
- IisNotInstalledException.cs
- ToolStripContentPanel.cs
- CodeCompiler.cs
- Version.cs
- EmptyStringExpandableObjectConverter.cs
- SessionStateItemCollection.cs
- ErrorStyle.cs
- SqlSupersetValidator.cs
- TriggerAction.cs
- DetailsViewInsertEventArgs.cs
- ObjRef.cs
- ModelChangedEventArgsImpl.cs
- recordstate.cs
- UnmanagedHandle.cs
- FilePrompt.cs
- RuleSettings.cs
- RegisteredHiddenField.cs
- ByteViewer.cs
- cookie.cs
- FormViewUpdateEventArgs.cs
- DynamicAttribute.cs
- WorkflowViewService.cs
- RootProfilePropertySettingsCollection.cs
- Table.cs
- XmlCountingReader.cs