validateEnabledThingworxUser depricated and alternative does not work same, what was changed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
validateEnabledThingworxUser depricated and alternative does not work same, what was changed?
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.
- Labels:
-
Extensions
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Also issueAuthenticationChallenge gets called even if setRequiresChallenge(false); with deprecated validateEnabledThingworxUser.
A bug maybe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Where can you see the version?
Is this any good?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sure, I reopened case#
13319467
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Custom Authentificator https://support.ptc.com/apps/case_logger_viewer/auth/ssl/case=13319467 with Michael Neumann
- Certificate Authentification: https://support.ptc.com/apps/case_logger_viewer/auth/ssl/case=13662500 with Silvia Balta
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.
- Sync is pretty much solved thanks to Silvia Balta and releated case, which resulted in custom java extension.
- Just one question: What is the User password if not provided during creation?
- Authenticifator has mentioned problems.
- validateEnabledThingworxUser deprication, which maybe version missmatch (sdk 7.4.0)... (reopened case 13319467)
- setRequiresChallenge(false) does not seems to have effect...
- Is there any progress with friendly names and tooltips error Custom Extension - configuration table title and tooltips
- maybe some releated implementation qustions on best practices...
Thanks JG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is certainly working for me with the 7.2 Extension SDK, as I thought. I will try now in 7.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So, Jan Gabriel, what problems or questions remain now that you have resolved the versions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
