| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //
- // LocalClientSecuritySettings.cs
- //
- // Author:
- // Atsushi Enomoto <[email protected]>
- //
- // Copyright (C) 2005 Novell, Inc. http://www.novell.com
- //
- // Permission is hereby granted, free of charge, to any person obtaining
- // a copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to
- // permit persons to whom the Software is furnished to do so, subject to
- // the following conditions:
- //
- // The above copyright notice and this permission notice shall be
- // included in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- //
- using System;
- using System.ServiceModel.Security;
- namespace System.ServiceModel.Channels
- {
- [MonoTODO]
- public sealed class LocalClientSecuritySettings
- {
- bool cache_cookies = true;
- int cookie_renewal = 60;
- bool detect_replays = true;
- IdentityVerifier verifier = IdentityVerifier.CreateDefault ();
- TimeSpan max_clock_skew = TimeSpan.FromMinutes (5);
- TimeSpan max_cookie_cache_time = TimeSpan.MaxValue;
- bool reconnect = true;
- int replay_cache_size = 900000;
- TimeSpan replay_window = TimeSpan.FromMinutes (5);
- TimeSpan renewal_interval = TimeSpan.FromHours (10);
- TimeSpan rollover_interval = TimeSpan.FromMinutes (5);
- TimeSpan validity_duration = TimeSpan.FromMinutes (5);
- public LocalClientSecuritySettings ()
- {
- }
- public bool CacheCookies {
- get { return cache_cookies; }
- set { cache_cookies = value; }
- }
- public int CookieRenewalThresholdPercentage {
- get { return cookie_renewal; }
- set { cookie_renewal = value; }
- }
- public bool DetectReplays {
- get { return detect_replays; }
- set { detect_replays = value; }
- }
- public IdentityVerifier IdentityVerifier {
- get { return verifier; }
- set { verifier = value; }
- }
- public TimeSpan MaxClockSkew {
- get { return max_clock_skew; }
- set { max_clock_skew = value; }
- }
- public TimeSpan MaxCookieCachingTime {
- get { return max_cookie_cache_time; }
- set { max_cookie_cache_time = value; }
- }
- public bool ReconnectTransportOnFailure {
- get { return reconnect; }
- set { reconnect = value; }
- }
- public int ReplayCacheSize {
- get { return replay_cache_size; }
- set { replay_cache_size = value; }
- }
- public TimeSpan ReplayWindow {
- get { return replay_window; }
- set { replay_window = value; }
- }
- public TimeSpan SessionKeyRenewalInterval {
- get { return renewal_interval; }
- set { renewal_interval = value; }
- }
- public TimeSpan SessionKeyRolloverInterval {
- get { return rollover_interval; }
- set { rollover_interval = value; }
- }
- public TimeSpan TimestampValidityDuration {
- get { return validity_duration; }
- set { validity_duration = value; }
- }
- [MonoTODO ("What happens to IdentityVerifier?")]
- public LocalClientSecuritySettings Clone ()
- {
- return (LocalClientSecuritySettings) MemberwiseClone ();
- }
- }
- }
|