public void ReadIssuedTokens(Message message, MessageDirection direction)
        {
            TransactionFlowOption flowIssuedTokens = this.factory.FlowIssuedTokens;
            ICollection <RequestSecurityTokenResponse> issuedTokens = this.GetIssuedTokens(message);

            if ((issuedTokens != null) && (issuedTokens.Count != 0))
            {
                if (flowIssuedTokens == TransactionFlowOption.NotAllowed)
                {
                    this.FaultOnMessage(message, System.ServiceModel.SR.GetString("IssuedTokenFlowNotAllowed"), "IssuedTokenFlowNotAllowed");
                }
                foreach (RequestSecurityTokenResponse response in issuedTokens)
                {
                    TransactionFlowProperty.Ensure(message).IssuedTokens.Add(response);
                }
            }
        }
Exemplo n.º 2
0
        public void ReadIssuedTokens(Message message, MessageDirection direction)
        {
            TransactionFlowOption option = this.factory.FlowIssuedTokens;

            ICollection <RequestSecurityTokenResponse> issuances = this.GetIssuedTokens(message);

            if (issuances != null && issuances.Count != 0)
            {
                if (option == TransactionFlowOption.NotAllowed)
                {
                    FaultOnMessage(message, SR.GetString(SR.IssuedTokenFlowNotAllowed), FaultCodeConstants.Codes.IssuedTokenFlowNotAllowed);
                }

                foreach (RequestSecurityTokenResponse rstr in issuances)
                {
                    TransactionFlowProperty.Ensure(message).IssuedTokens.Add(rstr);
                }
            }
        }