[Users] Loading Geoserver secured WMS
Hugo
hfpmartins at gmail.com
Tue Nov 15 11:25:07 CET 2011
Hello all,
I'm trying to achieve Geoserver (2.1) authentication through an app being
developed with GeoExt. I've found some hints posted by Andreas, saying to
use the HTTP Basic Auth way.
So if i use the url http://user:password@localhost:8080/geoserver/wms for
my layers, i always get a window asking for the user to enter credentials.
If i do that, the layers are being correctly loaded, however i would like
to avoid the opening of this window. Here is the situation:
When the user loads this app, he needs to login. If login is successful
then the user will enter to the map interface. The login request, if
successful, is sending back the geoserver username and password. So i would
like to use this to achieve login to geoserver without prompting the user
again to enter credentials.
Any suggestions?
I've also found
http://getsatisfaction.com/opengeo/topics/auth_in_geoserver_with_html_php_js
As of my understanding of this post, if we use j_spring_security_check we
should get a JSESSONID which can be used as a cookie on the app. I have
also tried the following:
Ext.Ajax.request({
url: 'http://localhost:8080/geoserver/j_spring_security_check?',
method: 'POST',
scriptTag: true,
params: {
username: geoserverUser,
password: geoserverPass
},
success: function(){//do stuff...}
});
Nevertheless, the form is still popping out to introduce the user and
password, although i get a sucessfull post request (though the
response is window.location.replace("web");
).
Thanks in advance. Kind regards,
Hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111115/b4d6aa22/attachment-0001.htm
More information about the Users
mailing list