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); }
public void OnNegotiationSucceed(IPrincipal principal) { Utils.Trace(TraceLevel.Verbose, "{0}: negotiation succeed", this); this.negotiator = null; this.Principal = principal; this.CompleteOpen(false, null); }
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); }
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); }
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); } }
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); } }
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(); } }
public SaslTransport(TransportBase transport, SaslTransportProvider provider, bool isInitiator) : base("sasl") { this.innerTransport = transport; this.negotiator = new SaslNegotiator(this, provider, isInitiator); }
protected override bool OpenInternal() { this.negotiator = new SaslNegotiator(this, this.provider); return(this.negotiator.Start()); }
protected override bool OpenInternal() { this.negotiator = new SaslNegotiator(this, this.provider); return this.negotiator.Start(); }