View Full Version : Setting username and password in proxy/store

1 Mar 2012, 7:34 AM
How can I inside the store/proxy setup a username and password to access a web service/rest/ajax etc without prompting?

For example I have a delicious account I want to retrieve a set of urls from, for this I need to supply a username and password in order to login and get the data from my account

1 Mar 2012, 8:00 AM
Is this standard HTTP/Basic Auth or some other mechanism?

2 Mar 2012, 2:37 AM
For now basic auth - specifically access to http://www.delicious.com/ which requires a username and password

2 Mar 2012, 9:07 AM
I learned this morning that BasicAuth is nothing more than a header which has base64 encoded username:password.

Setting the headers on the proxy object will enable you to do this.

24 Jan 2013, 8:14 AM
And how can I access the header on JSONP? Via property extraParams?

24 Jan 2013, 10:21 AM
It's not possible directly on the client-side. Take a look at this stackoverflow question.


25 Jan 2013, 9:43 AM
Did not solve my problem.

I have now included a button, where I make manually an ajax call to URL.
It is successful, also looking into the header -> Authorization parameter is set.

//try to contact the server
var auth = 'XXX';
var url = 'http://xxx';

// ExtJS
url : url,
method : 'GET',
headers : { Authorization : 'BASIC ' + auth }

But the Authorization parameter is still missing in the JSONP requests. Same URL as above.

When entering my Basic Auth information into the popup in the browser, every JSONP requests includes the Authorization parameter - but in an iOS Webview that popup does not appear and therefore I cannot enter the auth information.

Any further help?

28 Jan 2013, 11:45 AM
It's not possible to send additional headers on a script tag/jsonp request.