{{Quickfixn}} Username in Acceptor/OnLogon

Pavel Karasev pavka1799 at gmail.com
Wed May 2 15:12:52 PDT 2018


Hello!

In "acceptor" I need to store additional information for a session after
successful logon of a client, e.g. a username provided in logon message.
>From QF/n documentation it seems the proper place to do this is
"IApplication.OnLogon()", as "OnLogon - notifies when a successful logon
has completed."
The issue is that I cannot find how to recover the username in "OnLogon".
It was available in "FromAdmin", and seems to be lost by the time OnLogon
is called.

Is it indeed so?

How would you recommend to solve this?
I can see few options:
Option 1. Store the username already in "FromAdmin" after validating
username/password (assuming the rest of logon process will be successful).
Option 2. Maintain additional dictionary <SessionID> -> <username>, add to
it in FromAdmin (on logon messages) and read from it in "OnLogon".

However not sure is Option 1 is completely valid / safe?
And Option 2 seems to be over-complication...

Thank you!

Best regards
Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180503/ab1bd96a/attachment.html>


More information about the Quickfixn mailing list