hi i am making a restlet which will be called by s...
# suitescript
r
hi i am making a restlet which will be called by suitelet which will have login details and the restlet will validate that details and if it is validated it return true... how can i achieve this? rest role services ?
b
use the internal url of the restlet
r
No, I have suitelet 1. Will have field login and password 2. User will put login and password 3. Then suitelet at submit will call restlet 4. I will send the login and password in url and get that in restlet now 5. Restlet will then verify the login details with logic How do I verify the details in restlet? What do I use?
b
what are the login and password for?
r
idk client needs it
but i guess this is possible
i just dont know how
b
restlets already require authentication
r
its a custom requirement for that specific suitelet ... if authenticated only then it will run
b
i dont think its sane to authenticate using a restlet
but you will be using the internal url of the restlet, do a get to it
get the username and password from the parameters
and then check if they are valid values
r
by parameters do you the mean in the url ?
parameters of username and pass in url?
valid values as in.. search for whether such login and pass exists?
b
again, you cant validate credential to netsuite
the restlet will do it for you
your primary chance of getting this to work is if the username and password arent related to netsuite
trying to validate netsuite credentials is only sane for an app trying to steal netsuite credentials
r
like before accessing the restlet it will make sure the values are valid so that it can access the restlet? OR the restlet after using some code itself will check whether login is valid ?
yeah right ..it wont be sense to use it internally i guess
yup right suitelet is external
and will validate through REST roles services
b
nothing about this sounds sane
usually you use the internal url of a suitelet to make sure that the user has access to netsuite