Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / LocalClientSecuritySettings.cs / 1 / LocalClientSecuritySettings.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System; using System.ServiceModel; using System.Runtime.Serialization; using System.ServiceModel.Security; public sealed class LocalClientSecuritySettings { bool detectReplays; int replayCacheSize; TimeSpan replayWindow; TimeSpan maxClockSkew; bool cacheCookies; TimeSpan maxCookieCachingTime; TimeSpan sessionKeyRenewalInterval; TimeSpan sessionKeyRolloverInterval; bool reconnectTransportOnFailure; TimeSpan timestampValidityDuration; IdentityVerifier identityVerifier; int cookieRenewalThresholdPercentage; LocalClientSecuritySettings(LocalClientSecuritySettings other) { this.detectReplays = other.detectReplays; this.replayCacheSize = other.replayCacheSize; this.replayWindow = other.replayWindow; this.maxClockSkew = other.maxClockSkew; this.cacheCookies = other.cacheCookies; this.maxCookieCachingTime = other.maxCookieCachingTime; this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval; this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval; this.reconnectTransportOnFailure = other.reconnectTransportOnFailure; this.timestampValidityDuration = other.timestampValidityDuration; this.identityVerifier = other.identityVerifier; this.cookieRenewalThresholdPercentage = other.cookieRenewalThresholdPercentage; } public bool DetectReplays { get { return this.detectReplays; } set { this.detectReplays = value; } } public int ReplayCacheSize { get { return this.replayCacheSize; } set { if (value < 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.ValueMustBeNonNegative))); } this.replayCacheSize = value; } } public TimeSpan ReplayWindow { get { return this.replayWindow; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.replayWindow = value; } } public TimeSpan MaxClockSkew { get { return this.maxClockSkew; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.maxClockSkew = value; } } public TimeSpan TimestampValidityDuration { get { return this.timestampValidityDuration; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.timestampValidityDuration = value; } } public bool CacheCookies { get { return this.cacheCookies; } set { this.cacheCookies = value; } } public TimeSpan MaxCookieCachingTime { get { return this.maxCookieCachingTime; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.maxCookieCachingTime = value; } } public int CookieRenewalThresholdPercentage { get { return this.cookieRenewalThresholdPercentage; } set { if (value < 0 || value > 100) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.ValueMustBeInRange, 0, 100))); } this.cookieRenewalThresholdPercentage = value; } } public TimeSpan SessionKeyRenewalInterval { get { return this.sessionKeyRenewalInterval; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.sessionKeyRenewalInterval = value; } } public TimeSpan SessionKeyRolloverInterval { get { return this.sessionKeyRolloverInterval; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.sessionKeyRolloverInterval = value; } } public bool ReconnectTransportOnFailure { get { return this.reconnectTransportOnFailure; } set { this.reconnectTransportOnFailure = value; } } public IdentityVerifier IdentityVerifier { get { return this.identityVerifier; } set { this.identityVerifier = value; } } public LocalClientSecuritySettings() { this.DetectReplays = SecurityProtocolFactory.defaultDetectReplays; this.ReplayCacheSize = SecurityProtocolFactory.defaultMaxCachedNonces; this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow; this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew; this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration; this.CacheCookies = IssuanceTokenProviderBase.defaultClientCacheTokens; this.MaxCookieCachingTime = IssuanceTokenProviderBase .DefaultClientMaxTokenCachingTime; this.SessionKeyRenewalInterval = SecuritySessionClientSettings.defaultKeyRenewalInterval; this.SessionKeyRolloverInterval = SecuritySessionClientSettings.defaultKeyRolloverInterval; this.ReconnectTransportOnFailure = SecuritySessionClientSettings.defaultTolerateTransportFailures; this.CookieRenewalThresholdPercentage = SpnegoTokenProvider.defaultServiceTokenValidityThresholdPercentage; this.IdentityVerifier = IdentityVerifier.CreateDefault(); } public LocalClientSecuritySettings Clone() { return new LocalClientSecuritySettings(this); } } } // 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
- SimpleMailWebEventProvider.cs
- CapabilitiesSection.cs
- EventWaitHandleSecurity.cs
- WebPartZoneBaseDesigner.cs
- EventLogPermissionEntry.cs
- SymbolEqualComparer.cs
- AsyncOperationContext.cs
- ListDataHelper.cs
- XmlByteStreamReader.cs
- ToolStripDropTargetManager.cs
- StatusBarDrawItemEvent.cs
- ToolStripSeparatorRenderEventArgs.cs
- PaintEvent.cs
- XmlSchemaObjectTable.cs
- SqlDataSourceEnumerator.cs
- GridViewRowCollection.cs
- GridEntry.cs
- ParameterCollection.cs
- ListItemCollection.cs
- SudsCommon.cs
- ConstraintEnumerator.cs
- CompoundFileIOPermission.cs
- ExpandSegmentCollection.cs
- AuthorizationRuleCollection.cs
- LogicalCallContext.cs
- ZipIOCentralDirectoryFileHeader.cs
- BaseTemplateBuildProvider.cs
- ComplexType.cs
- thaishape.cs
- SafeMarshalContext.cs
- ConnectionPoint.cs
- ToolboxItemFilterAttribute.cs
- ConstructorNeedsTagAttribute.cs
- ParameterReplacerVisitor.cs
- TogglePatternIdentifiers.cs
- MailMessageEventArgs.cs
- BrushValueSerializer.cs
- PageContentAsyncResult.cs
- DesignRelation.cs
- AppDomainProtocolHandler.cs
- LinkClickEvent.cs
- ActivityInterfaces.cs
- XmlNodeComparer.cs
- RichTextBoxContextMenu.cs
- SafeProcessHandle.cs
- BitmapEffectInputConnector.cs
- PageSetupDialog.cs
- DataPagerFieldCommandEventArgs.cs
- DesignerValidationSummaryAdapter.cs
- RewritingSimplifier.cs
- AxisAngleRotation3D.cs
- ServerIdentity.cs
- ComPlusServiceHost.cs
- NetworkInformationPermission.cs
- SecUtil.cs
- CustomSignedXml.cs
- MimeXmlImporter.cs
- ConfigurationSchemaErrors.cs
- DataGridCellsPresenter.cs
- XmlHierarchicalEnumerable.cs
- DbModificationClause.cs
- ImageCodecInfo.cs
- WebPartZone.cs
- HttpException.cs
- BitConverter.cs
- CompilerState.cs
- UIPermission.cs
- DbReferenceCollection.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- SystemTcpStatistics.cs
- LinkButton.cs
- Columns.cs
- ProviderUtil.cs
- NullableDoubleSumAggregationOperator.cs
- EntityType.cs
- TypeNameHelper.cs
- Table.cs
- MaskedTextBox.cs
- ArrangedElement.cs
- GC.cs
- MetadataStore.cs
- ExpressionValueEditor.cs
- CodeIndexerExpression.cs
- ErrorRuntimeConfig.cs
- HostedBindingBehavior.cs
- RawAppCommandInputReport.cs
- ExecutionEngineException.cs
- UIElement3D.cs
- EntityDataSourceContainerNameConverter.cs
- SystemInfo.cs
- XmlNamespaceManager.cs
- CacheForPrimitiveTypes.cs
- ProfileParameter.cs
- CoreSwitches.cs
- arabicshape.cs
- XsltConvert.cs
- TraceEventCache.cs
- TextTreeFixupNode.cs
- DesignerHelpers.cs
- adornercollection.cs