<div dir="ltr"><div>Hi Francis</div><div><br></div><div>I can only re-post my own similar question with a potential solution based on

"IApplicationExt.<wbr>FromEarlyIntercept"

handler

 (see below between 
***** ), though there was no answer from QuickFix/n gurus.</div><div>In your case you can add handling of 
MsgType.REJECT there...<br></div><div><br></div><div>Regards,</div><div>Pavel<br></div><div><br></div><div dir="ltr">*****<div>Please advise, what is the proper handling of wrong credentials on logon in initiator?</div><div><br></div><div>
<div>At the start of application Logon window is displayed to prompt for
 user name + password, and in case of logon failure corresponding 
message should be displayed, prompting for correct input again. How is 
this scenario supported by QuickFix/n?</div><div><br></div>

In case username/password is wrong, QuickFix/n Initiator will keep on 
logon attempts, and I could not find any other handler of this situation
 but in "IApplicationExt.<wbr>FromEarlyIntercept". Apparently no other 
handler is called in such a case, all logic is kept internally within 
the QuickFix/n engine - it just continues logon failures with the wrong 
password every <ReconnectInterval> seconds...</div><div><br></div><div>So, my questions are:<br></div><div>1. To handle invalid username/password

- is it correct to catch "logout" (MsgType=5) messages in "FromEarlyIntercept"?</div><div>(Also it implies having a flag that logon is in progress, to distinguish "wrong credentials logout" from other scenarios...)<br></div><div><br></div><div>2. How to stop Initiator from logons with the wrong credentials - is calling the session's "Logout" 
a proper solution? <br></div><div><br></div><div>3. The below code - 
does it look generally correct to handle invalid credentials in the 
client (initiator) app with a Logon window (assuming Connect() is called
 from the Logon window)?<br></div><div><br></div><div>Thank you!</div><div>
<div><br></div><div>Best regards,</div><div>Pavel</div><div><br></div>

</div><div>public void Connect(..)</div><div>{</div><div>    ...</div><div>    _connecting = true;</div><div>    _initiator.Start();</div><div>    ....<br></div><div>}</div><div><br></div><div>...<br></div><div><br></div><div>public void FromEarlyIntercept(Message msg, SessionID sessionID)<br>{</div><div>    if (_connecting)</div><div>    {<br></div><div>        string msgType = msg.Header.GetField(Tags.<wbr>MsgType);</div><div>        switch (msgType)<br>        {</div><div>            case MsgType.LOGOUT: // Got logout when connecting - wrong credentials?<br></div><div>                Session.LookupSession(<wbr>sessionID).Logout("Invalid credentials"); // Stop further logon attempts?<br></div><div>                <signal logon failure / wrong credentials to the Logon Window><br></div><div>                break;</div><div>            ...<br></div><div>        }</div><div>    }</div><div>   ...<br></div><div>}</div><div><br></div><div>public void OnLogon(SessionID sessionID)<br>{</div><div>    ...<br></div><div>    _connecting = false;</div><div>    ...<br></div><div>}</div><div>...</div><div class="gmail-adL"><br></div></div><div>

<br></div><div>*****<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 June 2018 at 23:40, Francis Gingras <span dir="ltr"><<a href="mailto:francis@collective2.com" target="_blank">francis@collective2.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>
<span style="font-family:'Tahoma';font-size:12pt">Hi guys,<br>
<br>
Is there a configuration option that would let QF process a Reject as a response to a Logon message? This counterparty responds to failed auth with a reject but the message never makes it to the QF MessageCracker. I am using QF/n 1.8<br>
<br>
20180620-21:33:40.584 : Initiated logon request<br>
20180620-21:33:40.686 : Session FIX.4.2:blabla->Coinbase disconnecting: Received msg type '3' when not logged on<br>
<br>
20180620-21:33:40.584 : 8=FIX.4.2 9=178 35=A 34=1 49=blabla=20180620-21:33:40.<wbr>567 56=Coinbase 96=superdupersecret 98=0 108=30 141=Y 554=notsosecret 8013=N 9406=Y 10=215 <br>
20180620-21:33:40.677 : 8=FIX.4.2 9=128 35=3 52=20180620-21:33:40.468 49=Coinbase 56=blabla=1 45=1 58=invalid signature 371=96 372=A 373=5 10=193 <br>
<br>
Thanks,<br>
<br>
Francis</span></div><br>______________________________<wbr>_________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" rel="noreferrer" target="_blank">http://lists.quickfixn.com/<wbr>listinfo.cgi/quickfixn-<wbr>quickfixn.com</a><br>
<br></blockquote></div><br></div>