Example #1
0
        public void AddSignedEndorsingSupportingToken(SecurityToken token, SecurityTokenParameters parameters)
        {
            if (token == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(token));
            }

            if (parameters == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(parameters));
            }

            ThrowIfProcessingStarted();
            ElementContainer.AddSignedEndorsingSupportingToken(token);
            AddParameters(ref _signedEndorsingTokenParameters, parameters);
        }
Example #2
0
        public void AddSignedEndorsingSupportingToken(SecurityToken token, SecurityTokenParameters parameters)
        {
            if (token == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(token));
            }

            if (parameters == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(parameters));
            }

            ThrowIfProcessingStarted();
            ElementContainer.AddSignedEndorsingSupportingToken(token);
            HasSignedTokens     = true;
            ShouldSignToHeader |= (!RequireMessageProtection) && (SecurityUtils.GetSecurityKey <AsymmetricSecurityKey>(token) != null);
            AddParameters(ref _signedEndorsingTokenParameters, parameters);
        }