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
- SelectorItemAutomationPeer.cs
- XmlWriterSettings.cs
- InheritanceContextHelper.cs
- WindowsFormsSectionHandler.cs
- BoolExpression.cs
- ReadOnlyCollection.cs
- SqlServices.cs
- SymbolTable.cs
- ListChunk.cs
- RepeatBehaviorConverter.cs
- Marshal.cs
- CompositeDataBoundControl.cs
- DataGridRow.cs
- SessionPageStatePersister.cs
- FontCacheUtil.cs
- PasswordDeriveBytes.cs
- Message.cs
- listitem.cs
- ItemPager.cs
- SchemaImporterExtensionsSection.cs
- ExpressionEditorAttribute.cs
- JpegBitmapEncoder.cs
- ModelMemberCollection.cs
- GridViewRow.cs
- TransformGroup.cs
- EqualityComparer.cs
- SearchExpression.cs
- EventLogPermissionAttribute.cs
- HyperLinkField.cs
- ProcessDesigner.cs
- pingexception.cs
- RequestTimeoutManager.cs
- XmlElement.cs
- ToolBarDesigner.cs
- CultureMapper.cs
- CroppedBitmap.cs
- InvalidDataException.cs
- SHA1.cs
- ArgumentsParser.cs
- SqlClientMetaDataCollectionNames.cs
- EdmProviderManifest.cs
- DependencyObject.cs
- ErrorFormatterPage.cs
- DataListItem.cs
- CodeBinaryOperatorExpression.cs
- CallTemplateAction.cs
- TypeInitializationException.cs
- ButtonBase.cs
- GlyphRunDrawing.cs
- Transform.cs
- XomlCompilerResults.cs
- BinaryObjectReader.cs
- ContentAlignmentEditor.cs
- DecimalConverter.cs
- DrawingState.cs
- OutputCacheProfile.cs
- BindingContext.cs
- RtfControls.cs
- URLIdentityPermission.cs
- QueryParameter.cs
- XmlDocumentViewSchema.cs
- MatchAllMessageFilter.cs
- StoreItemCollection.cs
- FrameworkName.cs
- OverflowException.cs
- SqlTriggerAttribute.cs
- CodeNamespaceCollection.cs
- DictionaryGlobals.cs
- CreateUserErrorEventArgs.cs
- SplitterPanelDesigner.cs
- UInt64Converter.cs
- ScriptingRoleServiceSection.cs
- EndpointConfigContainer.cs
- SchemaHelper.cs
- NetCodeGroup.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- NonDualMessageSecurityOverHttp.cs
- ParserStreamGeometryContext.cs
- CommonRemoteMemoryBlock.cs
- FrameworkElement.cs
- DynamicRendererThreadManager.cs
- SecurityUtils.cs
- SmtpNetworkElement.cs
- SparseMemoryStream.cs
- ImmComposition.cs
- WorkflowRuntimeServiceElement.cs
- DigestComparer.cs
- CodeTypeConstructor.cs
- XmlQueryOutput.cs
- SqlDataSourceCommandEventArgs.cs
- Pair.cs
- CodeStatement.cs
- SinglePhaseEnlistment.cs
- DataError.cs
- PermissionToken.cs
- XmlSerializationReader.cs
- HtmlTableRowCollection.cs
- TcpWorkerProcess.cs
- MetadataHelper.cs
- CharEnumerator.cs