Re: [Quickfix-developers] username / password in logon msg?
Brought to you by:
orenmnero
|
From: Scott H. <sco...@fo...> - 2005-10-27 15:06:30
|
Oh, I had put them into the .cfg file such as in the snippet below: [SESSION] TargetCompID=... Username=the_username Password=the_password ... As of 1.9.4, quickfix would let you put anything you want into that SessionSettings; you'll have to check the code to make sure that's still the case. On Thu, 27 Oct 2005, Alvin Wang wrote: > Hi Scott, > > Just wonder how you put username/password into sessionId before the toAdmin callback? > Thanks > Alvin > > String username = sessionSettings.getString(sessionId, "Username"); > > > > > > Scott Harrington <sco...@fo...> > Sent by: qui...@li... > 10/04/2005 06:08 PM > > > To: qui...@li... > cc: > bcc: > Subject: Re: [Quickfix-developers] username / password in logon msg? > > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Alvin: > > You can stuff the special fields into the outgoing Logon message by > implementing the toAdmin callback. In Java I do something like this for > counterparties that use this type of authentication: > > if (message instanceof quickfix.fix43.Logon) { > quickfix.fix43.Logon logon = (quickfix.fix43.Logon) message; > try { > String username = sessionSettings.getString(sessionId, "Username"); > logon.set(new quickfix.field.Username(username)); > String password = sessionSettings.getString(sessionId, > "Password"); > logon.set(new quickfix.field.Password(password)); > } > catch (Exception xx) { > throw new RuntimeException("Username and Password must be > specified in QuickFIX configuration"); > } > } > > > On Tue, 4 Oct 2005, Alvin Wang wrote: > >> Hi, >> >> How to include username (553) and password (554) in Logon message? Is >> there a way to do it in the configuration? That should be most intuitive >> >> Thanks >> Alvin |