public SecurityContextSecurityTokenResolver(int securityContextCacheCapacity, bool removeOldestTokensOnCacheFull, TimeSpan clockSkew) { this.clockSkew = SecurityProtocolFactory.defaultMaxClockSkew; if (securityContextCacheCapacity <= 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("securityContextCacheCapacity", System.ServiceModel.SR.GetString("ValueMustBeGreaterThanZero"))); } if (clockSkew < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("clockSkew", System.ServiceModel.SR.GetString("TimeSpanCannotBeLessThanTimeSpanZero"))); } this.capacity = securityContextCacheCapacity; this.removeOldestTokensOnCacheFull = removeOldestTokensOnCacheFull; this.clockSkew = clockSkew; this.tokenCache = new SecurityContextTokenCache(this.capacity, this.removeOldestTokensOnCacheFull, clockSkew); }
public SecurityContextSecurityTokenResolver(int securityContextCacheCapacity, bool removeOldestTokensOnCacheFull, TimeSpan clockSkew) { this.clockSkew = SecurityProtocolFactory.defaultMaxClockSkew; if (securityContextCacheCapacity <= 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("securityContextCacheCapacity", System.ServiceModel.SR.GetString("ValueMustBeGreaterThanZero"))); } if (clockSkew < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("clockSkew", System.ServiceModel.SR.GetString("TimeSpanCannotBeLessThanTimeSpanZero"))); } this.capacity = securityContextCacheCapacity; this.removeOldestTokensOnCacheFull = removeOldestTokensOnCacheFull; this.clockSkew = clockSkew; this.tokenCache = new SecurityContextTokenCache(this.capacity, this.removeOldestTokensOnCacheFull, clockSkew); }
public SecurityContextSecurityTokenResolver(int securityContextCacheCapacity, bool removeOldestTokensOnCacheFull, TimeSpan clockSkew) { if (securityContextCacheCapacity <= 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(securityContextCacheCapacity), SR.ValueMustBeGreaterThanZero)); } if (clockSkew < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(clockSkew), SR.TimeSpanCannotBeLessThanTimeSpanZero)); } this.capacity = securityContextCacheCapacity; this.removeOldestTokensOnCacheFull = removeOldestTokensOnCacheFull; this.clockSkew = clockSkew; this.tokenCache = new SecurityContextTokenCache(this.capacity, this.removeOldestTokensOnCacheFull, clockSkew); }