protected override DescribedList OnCommand(DescribedList command)
            {
                if (command.Descriptor.Code == Codec.SaslInit.Code)
                {
                    SaslInit init = (SaslInit)command;
                    SaslCode code = this.ValidateCredentials(init);
                    return(new SaslOutcome()
                    {
                        Code = code
                    });
                }

                throw new AmqpException(ErrorCode.NotAllowed, command.ToString());
            }
Esempio n. 2
0
        protected override DescribedList OnCommand(DescribedList command)
        {
            if (command.Descriptor.Code == Codec.SaslInit.Code)
            {
                return(new SaslOutcome()
                {
                    Code = SaslCode.Ok
                });
            }
            else if (command.Descriptor.Code == Codec.SaslMechanisms.Code)
            {
                return(null);
            }

            throw new AmqpException(ErrorCode.NotAllowed, command.ToString());
        }