My company has an existing ProjectWise integration using the SDK. Out application is written in C# and we have a DLL that is written in C++ to make the API calls. I've been tasked with extending this DLL to support IMS authentication. A couple of challenges are that I'm new to both C++ and ProjectWise.
I’ve done some research and believe that I should implement the following:
hostName and dataSource are passed in from the C# code and assume hostname = “myServer” and dataSource = “myServer:myDataSource”
bool success = aaApi_GetDatasourceRelyingPartyIdentifier(MarshalHelper::BCLStringToWString(hostName).c_str(), relyingParty);
success = aaApi_LoginWithSecurityToken(MarshalHelper::BCLStringToWString(dataSourceName).c_str(), *relyingParty, false, NULL, NULL);
Does this look correct?
I don't know if your code is correct or not, but you might find MostOfDavesClasses helpful. You can find that at: https://github.com/DaveBrumbaugh/MostOfDavesClasses-CSharp-Wrappers-For-ProjectWise
And you might find my sample code helpful as well. You can find that at: https://github.com/DanWilliamsAtBentleyDotCom/Sample-Login-With-Security-Token
Dan WilliamsSolution ConsultantBentley Systems, IncorporatedPortland, OR, USA (Pacific Time UTC-08:00)
Thanks for the response. The code isn't correct. I talked with Dave and it looks like I'll have to do the following: