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
- SQLResource.cs
- SecUtil.cs
- DateRangeEvent.cs
- EntityDesignerDataSourceView.cs
- Hex.cs
- RangeValuePattern.cs
- ReadWriteControlDesigner.cs
- SymmetricKeyWrap.cs
- TablePattern.cs
- _DigestClient.cs
- Stroke2.cs
- OAVariantLib.cs
- DataBinding.cs
- ListControlStringCollectionEditor.cs
- Attributes.cs
- ProjectionNode.cs
- ProvidePropertyAttribute.cs
- GroupBox.cs
- WebPartConnectionsDisconnectVerb.cs
- KeyValueConfigurationCollection.cs
- HtmlTable.cs
- StoreContentChangedEventArgs.cs
- PageFunction.cs
- CalendarKeyboardHelper.cs
- X509Chain.cs
- IdentityNotMappedException.cs
- LinearKeyFrames.cs
- PolicyLevel.cs
- LineInfo.cs
- KeyValueInternalCollection.cs
- GridViewSortEventArgs.cs
- SqlConnectionString.cs
- SafeNativeMethodsOther.cs
- DictionarySectionHandler.cs
- EndpointBehaviorElementCollection.cs
- ObjectResult.cs
- ActivityCodeDomReferenceService.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ElementsClipboardData.cs
- SessionEndedEventArgs.cs
- Root.cs
- WebPartEditorApplyVerb.cs
- TransferRequestHandler.cs
- VerificationAttribute.cs
- DependentList.cs
- EdmProviderManifest.cs
- _ConnectOverlappedAsyncResult.cs
- ViewStateException.cs
- LocatorBase.cs
- HttpBrowserCapabilitiesBase.cs
- SizeF.cs
- LinqDataSourceContextData.cs
- WebEventTraceProvider.cs
- InvalidCommandTreeException.cs
- GuidTagList.cs
- CodeCommentStatement.cs
- ProfileManager.cs
- FrameSecurityDescriptor.cs
- TextTreeInsertElementUndoUnit.cs
- AssemblyUtil.cs
- TextSpanModifier.cs
- SQLBytes.cs
- RSAProtectedConfigurationProvider.cs
- EntityDataSourceStatementEditorForm.cs
- AttachedPropertyDescriptor.cs
- ConversionContext.cs
- DataGridAutomationPeer.cs
- XmlCharacterData.cs
- ComplexBindingPropertiesAttribute.cs
- LogSwitch.cs
- WorkflowRuntimeServiceElement.cs
- QualificationDataItem.cs
- TextElementEnumerator.cs
- TCPListener.cs
- ExpressionParser.cs
- XmlStreamStore.cs
- BufferedOutputStream.cs
- mansign.cs
- LayoutUtils.cs
- SystemIPGlobalStatistics.cs
- PropertyDescriptor.cs
- Size3D.cs
- HttpCapabilitiesBase.cs
- MapPathBasedVirtualPathProvider.cs
- VirtualPathProvider.cs
- CorrelationService.cs
- DefaultValueConverter.cs
- DataControlCommands.cs
- TextTreeTextElementNode.cs
- HTMLTextWriter.cs
- Vector3DCollectionValueSerializer.cs
- SchemaSetCompiler.cs
- CssStyleCollection.cs
- Evidence.cs
- SynchronousSendBindingElement.cs
- DataGridRelationshipRow.cs
- RowParagraph.cs
- PiiTraceSource.cs
- DefaultMemberAttribute.cs
- CoreSwitches.cs