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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Username and Password validation

pselvaraj-1
9-Granite

Username and Password validation

We have separated the presentation layer in angular js and rest of the business logic, data are maintained in TX platform. How to validate when the user enter the username and password from login screen? Is there anyway I can validate the user credentials username and password are matched with the TX system. I'm not able to retrive password stored in TX platform and compare with the user entered.

I am facing difficulty to compare password.. Pl assist.

4 REPLIES 4

I don't know how to do this in AngularJS, but make a request with HTTP basic authentication on some ThingWorx entity your user should have access to and check which response code you're getting back. If it's 200, then you're good to go.

To not repeat your username and password with every request you should probably utilize ThingWorx application keys, though.

Appreciate your response. This will workout to validate the username. But what if we pass knowingly invalid password then login test case would fail. So, I'm worried about that.

I suppose with the wrong password you would get some other response code than 200? 401 probably.

Yes. Thanks!!

Top Tags