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
- DynamicMetaObject.cs
- FontWeights.cs
- ImageMap.cs
- SqlCommand.cs
- RectangleF.cs
- DefaultParameterValueAttribute.cs
- ExceptionAggregator.cs
- MarshalByRefObject.cs
- SamlAssertion.cs
- BamlTreeMap.cs
- SmiContext.cs
- PtsContext.cs
- DateTimeAutomationPeer.cs
- DataGridPagerStyle.cs
- ProtocolViolationException.cs
- ProviderUtil.cs
- XamlTreeBuilder.cs
- DataColumnChangeEvent.cs
- CodeDomLoader.cs
- ServicePointManagerElement.cs
- LabelEditEvent.cs
- HtmlHead.cs
- IBuiltInEvidence.cs
- RangeBase.cs
- TemplateControlBuildProvider.cs
- Knowncolors.cs
- DataGrid.cs
- SectionVisual.cs
- SQlBooleanStorage.cs
- ServiceRouteHandler.cs
- BitArray.cs
- InvalidCommandTreeException.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- CodeNamespaceImport.cs
- SQLDecimal.cs
- ErasingStroke.cs
- HelpProvider.cs
- TextTreeInsertUndoUnit.cs
- CodeExpressionCollection.cs
- XmlReaderDelegator.cs
- TypedColumnHandler.cs
- Privilege.cs
- StatusBarPanelClickEvent.cs
- RelatedView.cs
- MenuItem.cs
- validationstate.cs
- MetadataProperty.cs
- ObjectCacheHost.cs
- URI.cs
- TextFormatterContext.cs
- RecordManager.cs
- ChangeBlockUndoRecord.cs
- DataGridBoolColumn.cs
- AnnotationResourceChangedEventArgs.cs
- DispatchRuntime.cs
- followingsibling.cs
- ServiceRouteHandler.cs
- SessionPageStatePersister.cs
- RadioButton.cs
- DependencyPropertyHelper.cs
- StatusBarPanel.cs
- ReadOnlyNameValueCollection.cs
- ConfigurationManagerInternal.cs
- DbConnectionPoolOptions.cs
- NullableBoolConverter.cs
- StdValidatorsAndConverters.cs
- ListItemDetailViewAttribute.cs
- ListViewItemCollectionEditor.cs
- XmlMapping.cs
- Rfc2898DeriveBytes.cs
- CodeSnippetStatement.cs
- ObjectSecurityT.cs
- XmlSerializationReader.cs
- TraceUtility.cs
- AppDomainManager.cs
- DataGridTextBoxColumn.cs
- PolyLineSegmentFigureLogic.cs
- Keywords.cs
- ZoneMembershipCondition.cs
- TypeInitializationException.cs
- GridPattern.cs
- KeyEvent.cs
- RotationValidation.cs
- BitmapEffectCollection.cs
- SqlBuilder.cs
- CompiledIdentityConstraint.cs
- GetReadStreamResult.cs
- BufferBuilder.cs
- FrameworkContentElement.cs
- AncillaryOps.cs
- ConfigurationStrings.cs
- CompositionAdorner.cs
- GPRECT.cs
- WpfWebRequestHelper.cs
- ModelItemCollectionImpl.cs
- DataGridColumnEventArgs.cs
- IPHostEntry.cs
- NavigationProgressEventArgs.cs
- EntityWithKeyStrategy.cs
- TextSpan.cs