2 // LocalServiceSecuritySettings.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2005 Novell, Inc. http://www.novell.com
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using System.Collections.Generic;
30 using System.Collections.ObjectModel;
31 using System.Runtime.Serialization;
32 using System.Transactions;
33 using System.ServiceModel.Security;
35 namespace System.ServiceModel.Channels
38 public sealed class LocalServiceSecuritySettings
41 TimeSpan max_clock_skew;
43 int replay_cache_size;
44 TimeSpan inactivity_timeout, cookie_lifetime,
45 negotiation_timeout, replay_window, renewal_interval,
46 rollover_interval, validity_duration;
47 Collection<Type> claim_types =
48 new Collection<Type> ();
49 int max_sessions, max_negotiations, max_cached_cookies;
50 SecurityStateEncoder encoder;
53 public LocalServiceSecuritySettings ()
57 public bool DetectReplays {
58 get { return detect_replays; }
59 set { detect_replays = value; }
62 public TimeSpan InactivityTimeout {
63 get { return inactivity_timeout; }
64 set { inactivity_timeout = value; }
67 public TimeSpan IssuedCookieLifetime {
68 get { return cookie_lifetime; }
69 set { cookie_lifetime = value; }
72 public int MaxCachedCookies {
73 get { return max_cached_cookies; }
74 set { max_cached_cookies = value; }
77 public TimeSpan MaxClockSkew {
78 get { return max_clock_skew; }
79 set { max_clock_skew = value; }
82 public int MaxPendingSessions {
83 get { return max_sessions; }
84 set { max_sessions = value; }
87 public int MaxStatefulNegotiations {
88 get { return max_negotiations; }
89 set { max_negotiations = value; }
92 public TimeSpan NegotiationTimeout {
93 get { return negotiation_timeout; }
94 set { negotiation_timeout = value; }
97 public bool ReconnectTransportOnFailure {
98 get { return reconnect; }
99 set { reconnect = value; }
102 public int ReplayCacheSize {
103 get { return replay_cache_size; }
104 set { replay_cache_size = value; }
107 public TimeSpan ReplayWindow {
108 get { return replay_window; }
109 set { replay_window = value; }
112 public TimeSpan SessionKeyRenewalInterval {
113 get { return renewal_interval; }
114 set { renewal_interval = value; }
117 public TimeSpan SessionKeyRolloverInterval {
118 get { return rollover_interval; }
119 set { rollover_interval = value; }
122 public TimeSpan TimestampValidityDuration {
123 get { return validity_duration; }
124 set { validity_duration = value; }
127 public LocalServiceSecuritySettings Clone ()
129 LocalServiceSecuritySettings other = (LocalServiceSecuritySettings) MemberwiseClone ();
130 other.claim_types = new Collection<Type> (claim_types);