Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
In custom Authentificator, I have this code and it works fine:
Since validateEnabledThingworxUser is depricated in favor of validateThingworxUser, I changed the method.
Now I am getting error:
Authenticator threw an exception while invoking authenticate(...), authenticatorName=WebsealAuth, exception=tried to access method com.thingworx.security.authentication.AuthenticationUtilities.validateThingworxUser(Ljava/lang/String;)Lcom/thingworx/security/users/User; from class
What has changed? Cannot find anything in JavaDoc, how is that even possible when using catch with custom Exception?
Any help would be appriciated? Silvia Balta related to our case.
Solved! Go to Solution.
Ok with sdk 7.3.1 there is no validateThingworxUser and validateEnabledThingworxUser does not throw deprication and everything works as expected. You should use validateThingworxUser instead of validateEnabledThingworxUser from 7.4.x forward.
I can confirm that problem was caused (on my part) by version missmatch using 7.4.x sdk on 7.3.x Thingworx. Marketplace package did not have version in file name, which resulted in me not checking compatibility...
Tori Tielebein sorry to bother you with that, can we get back to questions above?
Also issueAuthenticationChallenge gets called even if setRequiresChallenge(false); with deprecated validateEnabledThingworxUser.
A bug maybe?
this.setRequiresChallenge(false) does not seem to make any difference. I would like to pass to next Authentificator without needing to enter issueAuthenticationChallenge and throwing seccond exception. Is it possible?
Also new method mentioned above throws exception I can not catch with this code snippet, any ideas? (Have to stay with depricated for now?)
Maybe Tori Tielebein would know?
Regards JG.
Can you tell me which version of the Extension SDK you are using? I don't have any issues like this in the older version, but I can test a newer version to verify if there are bugs or not (and it certainly sounds like there may be). You mentioned a case for this, can you tell me the number? I think this issue with "stRequiresChallenge" may need its own case, if it doesn't have one already.
Where can you see the version?
Is this any good?
Yeah, that's perfect. Is there a case for this already? If not, can you open one and I will grab it? Whether this is a bug or not, I will need to track my work in Salesforce. Thanks!
Sure, I reopened case#
With these version, you got me thinking. How are the SDK version compatible? Since older versions are not on marketplace, I did not think about it earlier...
My TW is 7.3.4 and SDK is clearly 7.4 is that OK? If not, where can I get older SDK?
EDIT: SDK in required version is on support portal.
To clarify I am running the Thingworx 7.3.4 for our customer and I needed to implement custom SSO.
That resulted in two cases with PTC:
That was when I realized, I need to split functionality between two modules. One is custom Authenticifator and the other is Sync, that fetches user data on timer event from 3rd party server using certificate authentification.
Thanks JG.
Jan, you are certainly not going to be able to use the 7.4 SDK in 7.3.4. Does this issue occur if you use the older libraries? I can still try to reproduce this, but I will say I have never seen this issue in older versions of the Extension SDK, which I have extensively used for authentication
I am done for today, but I will try later. Dont waste any more time on this, I am sure it is just versioning problem i did not notice, because archive names does not include version number.
I will let you know on monday, and we can maybe go through other issues if this one gets solved?
Have great weekend JG.
Sure, I will put the case on hold after the 7.4 test I will do in a moment. If there are still issues next week, we can have a Webex. Please see the case and email me with any questions or comments in the meantime.
Thanks! Have a nice weekend!
Tori
Ok with sdk 7.3.1 there is no validateThingworxUser and validateEnabledThingworxUser does not throw deprication and everything works as expected. You should use validateThingworxUser instead of validateEnabledThingworxUser from 7.4.x forward.
I can confirm that problem was caused (on my part) by version missmatch using 7.4.x sdk on 7.3.x Thingworx. Marketplace package did not have version in file name, which resulted in me not checking compatibility...
Tori Tielebein sorry to bother you with that, can we get back to questions above?
This is certainly working for me with the 7.2 Extension SDK, as I thought. I will try now in 7.4
Jan Gabriel I'm not sure if my previous comment was sent; what is ThingWorx behavior when you get the "Authenticator threw an exception while invoking authenticate..." error? Does the Composer load? Or is there other behavior?
So, Jan Gabriel, what problems or questions remain now that you have resolved the versions?