- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 01:40 AM
In my script, i'm query'ing the sys_user table with user_name and user_password. this is my query
var user_id='username';
var pass='password@123';
var target = new GlideRecord('sys_user');
target.addQuery('user_name', user_id);
target.addQuery('user_password', pass);
target.query();
while(target.next()){
///code
}
the password type in sys_user table is password(1 way encryption). how to decrypt this password? i tried using GlideEncrypter(); , but not getting the correct data.. Any help ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 01:46 AM
It was difficult to search and find your thread back to reply
Not sure if you have found the answer already. if not try below appraoch and see if it works for you ...
Create a scripted web service from where you will authenticate user.. And make your of the below script .. guess it should fit your case .. let me now if it works for you
try
{
var userName = request.user_name;
var userPassword = request.user_password;
var user = GlideUser;
var authed = user.authenticate(userName,userPassword);
if(authed)
{
response.isValid = 'Valid User';
}
else
{
response.isValid = 'Invalid User';
}
}
catch(e)
{
response.isValid = "Error While Authenticating:"+e;
}
I was able to do it successfully on demo.. So works atleast on demo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2014 02:08 AM
close this once you are done checking Cheers!