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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

ThingworxBasicAuthenticator in ThingWorx 8.5

vaishnavee
12-Amethyst

ThingworxBasicAuthenticator in ThingWorx 8.5

Hi all,

 

I am connecting to ThingWorx 8.5 foundation server using Java SDK. I need to validate the credentials while connecting via ConnectedThingsClient. If the validation fails, I need the proper error message showing exact reason. i.e.  I am expecting separate exceptions like server down, server is not responding, invalid username/password, connection timeout.

But ConnectedThingsClient.connect() throws a generic Exception object, with error message regarding the Connection Timed out. 

 

I came across the documentation for v6.0.9, where they have mentioned some entension classes like - ThingworxBasicAuthenticator , Authenticator and CustomAuthenticator etc. The link https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Composer/Security/Authenticators/AuthenticatorSampleExtensionConfiguration.html explains the usage of ThingworxBasicAuthenticator as well as shows how to write a custom authenticator. This is the official documentation for the class - http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.0_hc/index.jspx?id=ID2781167211&action=show

 

I do not want to implement a custom authenticator, as the basicAuthenticator would be enough for my requirement. But the classes are not found in the thingworx sdk jars 8.5.

I found an extension jar for version 8.3, but it also doesn't contain these classes and the class AuthenticationUtitlities is abstract.

 

Can some one please tell me where would I find the jar having these classes.

 

Thank you,

Vaishnavee

2 REPLIES 2

Hello @vaishnavee,

 

Just my 2 cents. I'd say that if you use wrong credentials and get an exception which says "connection timeout", then it's a bug that you should probably report to PTC Tech Support.

 

/ Constantine

Yes, if there is no solution to this, we will report a bug to PTC support. But I am hoping that the jars are some where out there and they haven't just removed the utitility classes without documenting it anywhere. 

Top Tags