In this case there is no need to for basic auth. You only have to create an HTTP POST request containing two parameters
username=admin password=geoserver Be aware of the fact that your are sending the password in plain text. Hope this helps Christian Zitat von "indian.ganesh" <[email protected]>: > hello everyone, > > here i am building an application using opengeo > suite sdk and geoserver. using opengeo suite sdk viewer i want to > edit/create features and styles in geoserver . > > for that i am trying to authenticate the geoserver from my application . > for that i am making an ajax call as follows > > > var username = 'admin'; > var password = 'geoserver'; > var tok = username + ':' + password; > var auth = "Basic "+ Base64.encode(tok); > var url = 'http://localhost:8080/geoserver/j_spring_security_check'; > Ext.Ajax.request({ > url : url, > method : 'POST', > headers : { Authorization : auth }, > params: { > username: username+'', > password: password+'' > }, > success: function(response){ > console.log(response); > alert("login successful"); > }, > failure: function(response) { > console.log(response); > alert("login incorrect"); > } > }); > > after firing this ajax request i get response as shown in the snapshot > attached.. > > in this snapshot it looks like the page is requesting geoserver web > administration interface console .. > i just want to get authenticated to geoserver without page redirection... > > any help will be appreciated.. > > thanks in advance > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
