{{Quickfixn}} disconnecting: Received msg type '3' when not logged on

Pavel pavka1799 at gmail.com
Sun Jun 24 04:24:10 PDT 2018


Hi Francis

I can only re-post my own similar question with a potential solution based
on "IApplicationExt.FromEarlyIntercept" handler (see below between ***** ),
though there was no answer from QuickFix/n gurus.
In your case you can add handling of MsgType.REJECT there...

Regards,
Pavel

*****
Please advise, what is the proper handling of wrong credentials on logon in
initiator?

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?

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.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...

So, my questions are:
1. To handle invalid username/password - is it correct to catch "logout"
(MsgType=5) messages in "FromEarlyIntercept"?
(Also it implies having a flag that logon is in progress, to distinguish
"wrong credentials logout" from other scenarios...)

2. How to stop Initiator from logons with the wrong credentials - is
calling the session's "Logout" a proper solution?

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)?

Thank you!

Best regards,
Pavel

public void Connect(..)
{
    ...
    _connecting = true;
    _initiator.Start();
    ....
}

...

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

public void OnLogon(SessionID sessionID)
{
    ...
    _connecting = false;
    ...
}
...


*****

On 20 June 2018 at 23:40, Francis Gingras <francis at collective2.com> wrote:

> Hi guys,
>
> 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
>
> 20180620-21:33:40.584 : Initiated logon request
> 20180620-21:33:40.686 : Session FIX.4.2:blabla->Coinbase disconnecting:
> Received msg type '3' when not logged on
>
> 20180620-21:33:40.584 : 8=FIX.4.2 9=178 35=A 34=1
> 49=blabla=20180620-21:33:40.567 56=Coinbase 96=superdupersecret 98=0
> 108=30 141=Y 554=notsosecret 8013=N 9406=Y 10=215
> 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
>
> Thanks,
>
> Francis
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180624/b3e389ec/attachment.htm>


More information about the Quickfixn mailing list