Ejemplo n.º 1
0
 public void OnNegotiationSucceed(IPrincipal principal)
 {
     MessagingClientEtwProvider.TraceClient <SaslTransport>((SaslTransport source) => MessagingClientEtwProvider.Provider.EventWriteAmqpLogOperation(source, TraceOperation.Execute, "OnNegotiationSucceed"), this);
     this.negotiator = null;
     base.Principal  = principal;
     base.CompleteOpen(false, null);
 }
Ejemplo n.º 2
0
 public void OnNegotiationSucceed(IPrincipal principal)
 {
     Utils.Trace(TraceLevel.Verbose, "{0}: negotiation succeed", this);
     this.negotiator = null;
     this.Principal  = principal;
     this.CompleteOpen(false, null);
 }
Ejemplo n.º 3
0
 public void OnNegotiationFail(Exception exception)
 {
     MessagingClientEtwProvider.TraceClient <SaslTransport, Exception>((SaslTransport source, Exception ex) => MessagingClientEtwProvider.Provider.EventWriteAmqpLogError(source, "OnNegotiationFail", ex.Message), this, exception);
     this.negotiator = null;
     this.innerTransport.SafeClose(exception);
     base.CompleteOpen(false, exception);
 }
Ejemplo n.º 4
0
 public void OnNegotiationFail(Exception exception)
 {
     Utils.Trace(TraceLevel.Error, "{0}: negotiation fail with {1}", this, exception);
     this.negotiator = null;
     this.innerTransport.TryClose(exception);
     this.CompleteOpen(false, exception);
 }
Ejemplo n.º 5
0
 public void OnNegotiationFail(Exception exception)
 {
     Utils.Trace(TraceLevel.Error, "{0}: negotiation fail with {1}", this, exception);
     this.negotiator = null;
     this.innerTransport.TryClose(exception);
     this.CompleteOpen(false, exception);
 }
Ejemplo n.º 6
0
 public void OnNegotiationSucceed(IPrincipal principal)
 {
     Utils.Trace(TraceLevel.Verbose, "{0}: negotiation succeed", this);
     this.negotiator = null;
     this.Principal = principal;
     this.CompleteOpen(false, null);
 }
Ejemplo n.º 7
0
 public void Start(SaslNegotiator saslNegotiator, SaslInit init, bool isClient)
 {
     this.saslNegotiator = saslNegotiator;
     try
     {
         this.OnStart(init, isClient);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         if (Fx.IsFatal(exception))
         {
             throw;
         }
         this.saslNegotiator.CompleteNegotiation(SaslCode.Sys, exception);
     }
 }
Ejemplo n.º 8
0
        public void Start(SaslNegotiator saslNegotiator, SaslInit init, bool isClient)
        {
            this.saslNegotiator = saslNegotiator;

            try
            {
                this.OnStart(init, isClient);
            }
            catch (Exception exception)
            {
                if (Fx.IsFatal(exception))
                {
                    throw;
                }

                this.saslNegotiator.CompleteNegotiation(SaslCode.Sys, exception);
            }
        }
Ejemplo n.º 9
0
        private static void OnWriteFrameComplete(TransportAsyncCallbackArgs args)
        {
            SaslNegotiator userToken = (SaslNegotiator)args.UserToken;

            if (args.Exception != null)
            {
                userToken.HandleException("OnWriteFrameComplete", args.Exception);
                return;
            }
            if ((bool)args.UserToken2)
            {
                userToken.ReadFrame();
                return;
            }
            if (userToken.state == SaslNegotiator.SaslState.End)
            {
                userToken.CompleteTransport();
            }
        }
Ejemplo n.º 10
0
 public SaslTransport(TransportBase transport, SaslTransportProvider provider, bool isInitiator) : base("sasl")
 {
     this.innerTransport = transport;
     this.negotiator     = new SaslNegotiator(this, provider, isInitiator);
 }
Ejemplo n.º 11
0
 protected override bool OpenInternal()
 {
     this.negotiator = new SaslNegotiator(this, this.provider);
     return(this.negotiator.Start());
 }
Ejemplo n.º 12
0
 protected override bool OpenInternal()
 {
     this.negotiator = new SaslNegotiator(this, this.provider);
     return this.negotiator.Start();
 }