public LocalServiceSecuritySettings Clone()
        {
            LocalServiceSecuritySettings other = (LocalServiceSecuritySettings)MemberwiseClone();

            other.claim_types = new Collection <Type> (claim_types);
            return(other);
        }
Exemplo n.º 2
0
 internal SecurityBindingElement()
 {
     DefaultAlgorithmSuite  = SecurityAlgorithmSuite.Default;
     MessageSecurityVersion = MessageSecurityVersion.Default;
     IncludeTimestamp       = true;
     KeyEntropyMode         = SecurityKeyEntropyMode.CombinedEntropy;
     endpoint         = new SupportingTokenParameters();
     operation        = new Dictionary <string, SupportingTokenParameters> ();
     opt_endpoint     = new SupportingTokenParameters();
     opt_operation    = new Dictionary <string, SupportingTokenParameters> ();
     client_settings  = new LocalClientSecuritySettings();
     service_settings = new LocalServiceSecuritySettings();
 }
 private LocalServiceSecuritySettings(LocalServiceSecuritySettings other)
 {
     this.detectReplays = other.detectReplays;
     this.replayCacheSize = other.replayCacheSize;
     this.replayWindow = other.replayWindow;
     this.maxClockSkew = other.maxClockSkew;
     this.issuedCookieLifetime = other.issuedCookieLifetime;
     this.maxStatefulNegotiations = other.maxStatefulNegotiations;
     this.negotiationTimeout = other.negotiationTimeout;
     this.maxPendingSessions = other.maxPendingSessions;
     this.inactivityTimeout = other.inactivityTimeout;
     this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval;
     this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval;
     this.reconnectTransportOnFailure = other.reconnectTransportOnFailure;
     this.timestampValidityDuration = other.timestampValidityDuration;
     this.maxCachedCookies = other.maxCachedCookies;
 }
 private LocalServiceSecuritySettings(LocalServiceSecuritySettings other)
 {
     this.detectReplays               = other.detectReplays;
     this.replayCacheSize             = other.replayCacheSize;
     this.replayWindow                = other.replayWindow;
     this.maxClockSkew                = other.maxClockSkew;
     this.issuedCookieLifetime        = other.issuedCookieLifetime;
     this.maxStatefulNegotiations     = other.maxStatefulNegotiations;
     this.negotiationTimeout          = other.negotiationTimeout;
     this.maxPendingSessions          = other.maxPendingSessions;
     this.inactivityTimeout           = other.inactivityTimeout;
     this.sessionKeyRenewalInterval   = other.sessionKeyRenewalInterval;
     this.sessionKeyRolloverInterval  = other.sessionKeyRolloverInterval;
     this.reconnectTransportOnFailure = other.reconnectTransportOnFailure;
     this.timestampValidityDuration   = other.timestampValidityDuration;
     this.maxCachedCookies            = other.maxCachedCookies;
 }
 private LocalServiceSecuritySettings(LocalServiceSecuritySettings other)
 {
     _detectReplays               = other._detectReplays;
     _replayCacheSize             = other._replayCacheSize;
     _replayWindow                = other._replayWindow;
     _maxClockSkew                = other._maxClockSkew;
     _issuedCookieLifetime        = other._issuedCookieLifetime;
     _maxStatefulNegotiations     = other._maxStatefulNegotiations;
     _negotiationTimeout          = other._negotiationTimeout;
     _maxPendingSessions          = other._maxPendingSessions;
     _inactivityTimeout           = other._inactivityTimeout;
     _sessionKeyRenewalInterval   = other._sessionKeyRenewalInterval;
     _sessionKeyRolloverInterval  = other._sessionKeyRolloverInterval;
     _reconnectTransportOnFailure = other._reconnectTransportOnFailure;
     _timestampValidityDuration   = other._timestampValidityDuration;
     _maxCachedCookies            = other._maxCachedCookies;
     _nonceCache = other._nonceCache;
 }
 internal void InitializeFrom(LocalServiceSecuritySettings settings)
 {
     if (settings == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings");
     }
     this.DetectReplays = settings.DetectReplays;
     this.IssuedCookieLifetime = settings.IssuedCookieLifetime;
     this.MaxClockSkew = settings.MaxClockSkew;
     this.MaxPendingSessions = settings.MaxPendingSessions;
     this.MaxStatefulNegotiations = settings.MaxStatefulNegotiations;
     this.NegotiationTimeout = settings.NegotiationTimeout;
     this.ReconnectTransportOnFailure = settings.ReconnectTransportOnFailure;
     this.ReplayCacheSize = settings.ReplayCacheSize;
     this.ReplayWindow = settings.ReplayWindow;
     this.SessionKeyRenewalInterval = settings.SessionKeyRenewalInterval;
     this.SessionKeyRolloverInterval = settings.SessionKeyRolloverInterval;
     this.InactivityTimeout = settings.InactivityTimeout;
     this.TimestampValidityDuration = settings.TimestampValidityDuration;
     this.MaxCachedCookies = settings.MaxCachedCookies;
 }
 internal void ApplyConfiguration(LocalServiceSecuritySettings settings)
 {
     if (settings == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings");
     }
     if (base.ElementInformation.Properties["detectReplays"].ValueOrigin != PropertyValueOrigin.Default)
     {
         settings.DetectReplays = this.DetectReplays;
     }
     settings.IssuedCookieLifetime = this.IssuedCookieLifetime;
     settings.MaxClockSkew = this.MaxClockSkew;
     settings.MaxPendingSessions = this.MaxPendingSessions;
     settings.MaxStatefulNegotiations = this.MaxStatefulNegotiations;
     settings.NegotiationTimeout = this.NegotiationTimeout;
     settings.ReconnectTransportOnFailure = this.ReconnectTransportOnFailure;
     settings.ReplayCacheSize = this.ReplayCacheSize;
     settings.ReplayWindow = this.ReplayWindow;
     settings.SessionKeyRenewalInterval = this.SessionKeyRenewalInterval;
     settings.SessionKeyRolloverInterval = this.SessionKeyRolloverInterval;
     settings.InactivityTimeout = this.InactivityTimeout;
     settings.TimestampValidityDuration = this.TimestampValidityDuration;
     settings.MaxCachedCookies = this.MaxCachedCookies;
 }
 internal void InitializeFrom(LocalServiceSecuritySettings settings)
 {
     if (settings == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings");
     }
     this.DetectReplays = settings.DetectReplays; // can't use default value optimization here because runtime default doesn't match config default
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.IssuedCookieLifetime, settings.IssuedCookieLifetime);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxClockSkew, settings.MaxClockSkew);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxPendingSessions, settings.MaxPendingSessions);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxStatefulNegotiations, settings.MaxStatefulNegotiations);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.NegotiationTimeout, settings.NegotiationTimeout);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReconnectTransportOnFailure, settings.ReconnectTransportOnFailure);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReplayCacheSize, settings.ReplayCacheSize);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReplayWindow, settings.ReplayWindow);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SessionKeyRenewalInterval, settings.SessionKeyRenewalInterval);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SessionKeyRolloverInterval, settings.SessionKeyRolloverInterval);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.InactivityTimeout, settings.InactivityTimeout);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.TimestampValidityDuration, settings.TimestampValidityDuration);
     SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxCachedCookies, settings.MaxCachedCookies);
 }