- 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-17-2014 04:44 AM
Hi kalaiarasan,
I'm using a scripted webservice for authenticating user credentials. From a flex application i'm calling this webservice by passing username & password as input parameters. I need to authenticate the user credentials and return a response. Hope you got my requirement .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 04:56 AM
Hi Vishnu,
You can then set both the username and password as system properties and call these properties while invoking the SOAP call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 06:00 AM
Thanks for the reply Subhajit, But how can i set parameters as system properties? I'm working with a scripted webservice..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 09:16 PM
You can use gs.getProperty('your property here'); to call your Username and Password values.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2014 05:02 AM
Haven't done this before .. Will try to setup something on demo ... will let you know ....