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
- InputBindingCollection.cs
- Base64Decoder.cs
- SingleSelectRootGridEntry.cs
- PropertyEmitterBase.cs
- WpfXamlMember.cs
- HttpHeaderCollection.cs
- NamespaceEmitter.cs
- RuleProcessor.cs
- XmlCharType.cs
- Literal.cs
- baseaxisquery.cs
- XdrBuilder.cs
- XmlWellformedWriter.cs
- CompiledQuery.cs
- HyperLinkField.cs
- DnsPermission.cs
- GridViewRowEventArgs.cs
- UnsafeCollabNativeMethods.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- JsonServiceDocumentSerializer.cs
- FileInfo.cs
- ResourceKey.cs
- ObjectQueryProvider.cs
- DataListAutoFormat.cs
- CommentGlyph.cs
- ResourceDictionaryCollection.cs
- SecurityProtocolFactory.cs
- AssemblyBuilder.cs
- formatter.cs
- ArcSegment.cs
- DoubleStorage.cs
- MultiBinding.cs
- HMACRIPEMD160.cs
- ContextInformation.cs
- CodeTypeReferenceExpression.cs
- PackageRelationship.cs
- SByte.cs
- ByteStreamMessageUtility.cs
- HttpConfigurationContext.cs
- ResumeStoryboard.cs
- NativeMethods.cs
- GenericRootAutomationPeer.cs
- NominalTypeEliminator.cs
- AncillaryOps.cs
- ScriptManagerProxy.cs
- _HTTPDateParse.cs
- SafeEventLogWriteHandle.cs
- ProfileGroupSettings.cs
- LicenseContext.cs
- EventTrigger.cs
- TableLayoutPanelBehavior.cs
- ListViewInsertedEventArgs.cs
- HyperLinkField.cs
- DBConnection.cs
- CompilerError.cs
- Process.cs
- RecordConverter.cs
- InternalRelationshipCollection.cs
- Trace.cs
- SiteMapHierarchicalDataSourceView.cs
- DataGridColumnStyleMappingNameEditor.cs
- CultureInfoConverter.cs
- TextDecorationCollection.cs
- ProviderIncompatibleException.cs
- StateMachineHelpers.cs
- Margins.cs
- ButtonBase.cs
- PenThread.cs
- StringValueSerializer.cs
- LiteralLink.cs
- Matrix.cs
- DbConnectionHelper.cs
- TriggerCollection.cs
- ListViewCancelEventArgs.cs
- TableSectionStyle.cs
- SqlNotificationRequest.cs
- ViewGenResults.cs
- DesignerResources.cs
- ElementFactory.cs
- WebPartDisplayModeCollection.cs
- DataListItem.cs
- DataTableReader.cs
- XmlLoader.cs
- FormatterServices.cs
- OAVariantLib.cs
- ModuleBuilderData.cs
- sqlinternaltransaction.cs
- Enum.cs
- SessionEndingEventArgs.cs
- DesignerDataTableBase.cs
- CodeComment.cs
- EventSinkActivity.cs
- GenericsInstances.cs
- DataSourceExpressionCollection.cs
- webclient.cs
- SelectionManager.cs
- ProfileGroupSettingsCollection.cs
- ClientProxyGenerator.cs
- ValidationErrorCollection.cs
- DataGridViewColumnCollection.cs