I am using GeoServer Version 2.2.4, and have been using it without any
security on the data layers accessed using OpenLayers. I am now trying to
add layer security to some of my layers. I have been researching this and
it appears that I need to add authentication to the header of each request
(or at least that is one option). I create the authorization string as
follows:
var userpass = username + ":" + password;
I calculate the base64 encoding of the string as below:
var auth = make_basic_auth(userpass); //The
make_basic_auth() function utilizes the Base64.js from Webtoolkit
<http://www.webtoolkit.info/javascript-base64.html> .
Then I add the following to the options in the HTTP request:
headers: {Authorization: auth}
In viewing the header of the request in Firebug, the authorization string is
included in the request header. But, the layer is not being read because I
get the pink tiles. I am using a ProxyHost.
If I am trying to accomplish the basic authorization in the wrong way,
please let me know. Any suggestions that you may have are greatly
appreciated.
Thanks,
Jerome Wendell
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users