cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

validateEnabledThingworxUser depricated and alternative does not work same, what was changed?

jgabriel
13-Aquamarine

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.

ACCEPTED SOLUTION

Accepted Solutions
jgabriel
13-Aquamarine
(To:ttielebein)

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?

View solution in original post

16 REPLIES 16
jgabriel
13-Aquamarine
(To:jgabriel)

Also issueAuthenticationChallenge gets called even if setRequiresChallenge(false); with deprecated validateEnabledThingworxUser.

A bug maybe?

jgabriel
13-Aquamarine
(To:jgabriel)

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.

ttielebein
14-Alexandrite
(To:jgabriel)

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.

jgabriel
13-Aquamarine
(To:ttielebein)

Where can you see the version?

Is this any good?

ttielebein
14-Alexandrite
(To:jgabriel)

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!

jgabriel
13-Aquamarine
(To:ttielebein)

Sure, I reopened case#

13319467

jgabriel
13-Aquamarine
(To:jgabriel)

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.

jgabriel
13-Aquamarine
(To:jgabriel)

Tori TielebeinSilvia Balta

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.

ttielebein
14-Alexandrite
(To:jgabriel)

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

jgabriel
13-Aquamarine
(To:ttielebein)

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.

ttielebein
14-Alexandrite
(To:jgabriel)

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

jgabriel
13-Aquamarine
(To:ttielebein)

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?

ttielebein
14-Alexandrite
(To:jgabriel)

This is certainly working for me with the 7.2 Extension SDK, as I thought. I will try now in 7.4

sbalta
13-Aquamarine
(To:jgabriel)

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?

ttielebein
14-Alexandrite
(To:jgabriel)

So, Jan Gabriel​, what problems or questions remain now that you have resolved the versions?

ttielebein
14-Alexandrite
(To:ttielebein)

There is a bug related to this filed with KCS documentation found here.

Announcements


Top Tags