public RequestSecurityTokenResponse(WSTrustMessage message)
 {
     Context       = message.Context;
     KeyType       = message.KeyType;
     KeySizeInBits = message.KeySizeInBits;
     RequestType   = message.RequestType;
 }
        /// <summary>
        /// This constructor is usually used on the RSTR sending side.
        /// </summary>
        /// <remarks>
        /// This constructor will copy some information, such as Context, KeyType, 
        /// KeySize and RequestType from the request message. Note here the RequestType
        /// is not a sub element under RSTR, need it just for token request processing.
        /// </remarks>
        public RequestSecurityTokenResponse(WSTrustMessage message)
            : base()
        {
            if (message == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("message");
            }

            RequestType = message.RequestType;  // note this is NOT a sub element under RSTR
            Context = message.Context;
            KeyType = message.KeyType;

            if (message.KeySizeInBits > 0 && StringComparer.Ordinal.Equals(message.KeyType, KeyTypes.Symmetric))
            {
                KeySizeInBits = message.KeySizeInBits;
            }
        }
예제 #3
0
        /// <summary>
        /// This constructor is usually used on the RSTR sending side.
        /// </summary>
        /// <remarks>
        /// This constructor will copy some information, such as Context, KeyType,
        /// KeySize and RequestType from the request message. Note here the RequestType
        /// is not a sub element under RSTR, need it just for token request processing.
        /// </remarks>
        public RequestSecurityTokenResponse(WSTrustMessage message)
            : base()
        {
            if (message == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("message");
            }

            RequestType = message.RequestType;  // note this is NOT a sub element under RSTR
            Context     = message.Context;
            KeyType     = message.KeyType;

            if (message.KeySizeInBits > 0 && StringComparer.Ordinal.Equals(message.KeyType, KeyTypes.Symmetric))
            {
                KeySizeInBits = message.KeySizeInBits;
            }
        }
예제 #4
0
		public RequestSecurityTokenResponse (WSTrustMessage message) {
			Context = message.Context;
			KeyType = message.KeyType;
			KeySizeInBits = message.KeySizeInBits;
			RequestType = message.RequestType;
		}