Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / NegotiationTokenAuthenticatorState.cs / 1 / NegotiationTokenAuthenticatorState.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security { using System; using System.ServiceModel; using System.Collections; using System.Collections.Generic; using System.IdentityModel.Claims; using System.IdentityModel.Policy; using System.ServiceModel.Security.Tokens; class NegotiationTokenAuthenticatorState : IDisposable { bool isNegotiationCompleted; SecurityContextSecurityToken serviceToken; Object thisLock; public NegotiationTokenAuthenticatorState() { thisLock = new Object(); } public Object ThisLock { get { return thisLock; } } public bool IsNegotiationCompleted { get { return this.isNegotiationCompleted; } } public SecurityContextSecurityToken ServiceToken { get { CheckCompleted(); return this.serviceToken; } } public virtual void Dispose() { } public void SetServiceToken(SecurityContextSecurityToken token) { if (token == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("token"); } this.serviceToken = token; this.isNegotiationCompleted = true; } public virtual string GetRemoteIdentityName() { if (this.isNegotiationCompleted) { return SecurityUtils.GetIdentityNamesFromPolicies(this.serviceToken.AuthorizationPolicies); } return String.Empty; } void CheckCompleted() { if (!this.isNegotiationCompleted) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.NegotiationIsNotCompleted))); } } } } // 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
- SettingsBindableAttribute.cs
- HttpModuleCollection.cs
- SrgsOneOf.cs
- DataFormats.cs
- BaseTemplatedMobileComponentEditor.cs
- ScopeCollection.cs
- Matrix.cs
- SqlInternalConnection.cs
- TypedReference.cs
- FunctionImportMapping.cs
- _ListenerResponseStream.cs
- Container.cs
- ObjectListTitleAttribute.cs
- DiscreteKeyFrames.cs
- GraphicsContainer.cs
- DictionaryKeyPropertyAttribute.cs
- ReadOnlyCollection.cs
- MultiTouchSystemGestureLogic.cs
- TreeWalkHelper.cs
- ClonableStack.cs
- Stack.cs
- DayRenderEvent.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- RepeatButton.cs
- ContextStaticAttribute.cs
- Stacktrace.cs
- DrawItemEvent.cs
- CalculatedColumn.cs
- Attachment.cs
- TypefaceCollection.cs
- EntityDataSourceWrapperCollection.cs
- COM2ExtendedUITypeEditor.cs
- NodeLabelEditEvent.cs
- OrthographicCamera.cs
- ColorKeyFrameCollection.cs
- QueryAccessibilityHelpEvent.cs
- HttpRequestMessageProperty.cs
- SqlGenericUtil.cs
- AdapterDictionary.cs
- DataServiceException.cs
- AppearanceEditorPart.cs
- UnauthorizedAccessException.cs
- XmlSortKey.cs
- AutoSizeComboBox.cs
- ToolStripHighContrastRenderer.cs
- PipeException.cs
- OleDbReferenceCollection.cs
- TreeSet.cs
- Mutex.cs
- ExceptionWrapper.cs
- ListContractAdapter.cs
- BaseResourcesBuildProvider.cs
- EditCommandColumn.cs
- DSASignatureFormatter.cs
- DodSequenceMerge.cs
- DocumentViewerBase.cs
- AlphaSortedEnumConverter.cs
- WindowsRichEditRange.cs
- OleDbPermission.cs
- RawStylusInputCustomData.cs
- CryptoConfig.cs
- DBCommand.cs
- Transform3D.cs
- SequenceDesigner.cs
- ObjectDataSourceEventArgs.cs
- PasswordRecovery.cs
- Cursors.cs
- ReaderWriterLock.cs
- HttpModuleCollection.cs
- ComAwareEventInfo.cs
- RulePatternOps.cs
- TextEditorMouse.cs
- SafeThemeHandle.cs
- DiscoveryClientDuplexChannel.cs
- ScriptRegistrationManager.cs
- XmlSchemaElement.cs
- ToolStripItemCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- CompModSwitches.cs
- DataErrorValidationRule.cs
- ActivityDesignerResources.cs
- FirstMatchCodeGroup.cs
- BinaryConverter.cs
- EventLogWatcher.cs
- RuleProcessor.cs
- DSGeneratorProblem.cs
- CellRelation.cs
- FamilyTypeface.cs
- TransformPatternIdentifiers.cs
- ExpressionBuilder.cs
- WebPart.cs
- EntityClientCacheKey.cs
- ResXResourceSet.cs
- StackSpiller.Bindings.cs
- X509SecurityTokenProvider.cs
- FileStream.cs
- DataException.cs
- WindowsAltTab.cs
- IPipelineRuntime.cs
- Compiler.cs