I have a custom RSSL Interactive Provider built using RFA 7.6.2.E2 (C++ edition)
When this Interactive Provider is added to TREP it registers onto DACS using the username under which the Provider's process is running e.g. something like the 'radmin' user on Linux. This appears to happen "under the covers" as there is no code in the Provider explictly setting the user name.
If I wanted to replace this default user name with "CONFIG-NAME" it is my understanding that I should populate a StandardPrincipalIdentity and pass this as the second parameter to Session::acquire (see the following code snippet). Is this the correct thing to do?
rfa::common::StandardPrincipalIdentity* principalIdentity = new rfa::common::StandardPrincipalIdentity();
principalIdentity->setName(rfa::common::RFA_String("CONFIG-NAME", 0, false));
principalIdentity->setAppName(rfa::common::RFA_String("256", 0, false));
principalIdentity->setPosition(rfa::common::RFA_String("x.x.x.x/net", 0, false));
rfa::sessionLayer::Session* session = rfa::sessionLayer::Session::acquire("SessionMP1", principalIdentity);
Even if this is the right thing to do, the RFA Developer Guide (C++ Edition) states that: "The Session interface allows specification of a Principal Identity when acquiring a Session. This feature has been deprecated starting in RFA C++ 7.2 and will be removed completely in a future release. OpenDACS should be used instead."
The OpenDACS Developers Guide isn't entirely clear about how this should be achieved for an Interactive Provider. Is the following code snippet using AuthorizationAgent::login() correct?
// Assume same StandardPrincipleIdentity as above
rfa::dacs::AuthorizationRequest* authRequest = rfa::dacs::AuthorizationRequest::create();
authRequest->setPrincipalIdentity(principalIdentity);
// Assume rfa::dacs::AuthorizationAgent* authAgent and rfa::common::EventQueue* eventQueue
rfa::common::Handle* loginHandle = authAgent->login(*eventQueue, *authRequest, *this, NULL);
If I do use this OpenDACS interface, will the Session interface (until it is removed from RFA) still login with the "default" user name if I don't pass a StandardPrincipalIdentity to Session::acquire?
Do you have any idea about when the Session/PrincipalIdentity interface will be removed from RFA?