developerforce / Force.com-JavaScript-REST-Toolkit

ForceTK - a minimal Force.com REST API for JavaScript apps
BSD 3-Clause "New" or "Revised" License
315 stars 175 forks source link

SalesForce username+password authorization #58

Closed vnickolov closed 9 years ago

vnickolov commented 9 years ago

Hi,

Is there a way to use the username+password authorization?

Thank you in advance.

d00001 commented 9 years ago

You need to make POST request like this:

          $.ajax({
            type: "POST",
            url: self.requestUrl,
            data: {
                'client_secret': self.secret,
                'grant_type': self.grantType,
                'client_id': self.clientId,
                'username': username,
                'password': password
            }
        });
vnickolov commented 9 years ago

Thank you!

metadaddy commented 9 years ago

@vnickolov OK to close this issue?

vnickolov commented 9 years ago

Yes, of course, sorry I didn't close it earlier.