/// <summary> /// Creates a shallow copy of 'other'. /// </summary> /// <param name="other">The WSTrustTokenParameters to copy.</param> protected WSTrustTokenParameters(WSTrustTokenParameters other) : base(other) { foreach (var parameter in other.AdditionalRequestParameters) { AdditionalRequestParameters.Add(parameter); } CacheIssuedTokens = other.CacheIssuedTokens; foreach (var claimType in ClaimTypes) { ClaimTypes.Add(claimType); } _issuedTokenRenewalThresholdPercentage = other.IssuedTokenRenewalThresholdPercentage; KeySize = other.KeySize; _maxIssuedTokenCachingTime = other.MaxIssuedTokenCachingTime; _messageSecurityVersion = other.MessageSecurityVersion; }
public WSFederationBindingElement(WSTrustTokenParameters wsTrustTokenParameters, SecurityBindingElement securityBindingElement) { WSTrustTokenParameters = wsTrustTokenParameters; SecurityBindingElement = securityBindingElement; }
/// <summary> /// Creates a <see cref="WSFederationHttpBinding"/> to send a WSTrust message to an STS and attach the token received as /// an IssuedToken in the message to a WCF RelyingParty. /// </summary> /// <param name="wsTrustTokenParameters">the <see cref="WSTrustTokenParameters"/> that describe the WSTrust request.</param> /// <remarks>The <see cref="SecurityMode"/> (for the RelyingParty), is set to <see cref="SecurityMode.TransportWithMessageCredential"/>. /// <para>The ClientCredentialType (for the RelyingParty), is set to: <see cref="MessageCredentialType.IssuedToken"/>.</para></remarks> /// <exception cref="ArgumentNullException">if <paramref name="wsTrustTokenParameters"/> is null.</exception> public WSFederationHttpBinding(WSTrustTokenParameters wsTrustTokenParameters) : base(SecurityMode.TransportWithMessageCredential) { WSTrustTokenParameters = wsTrustTokenParameters ?? throw new ArgumentNullException(nameof(wsTrustTokenParameters)); Security.Message.ClientCredentialType = MessageCredentialType.IssuedToken; }