Hello
I have a layer cite: administration that is linked to a POSTGRESQL
database and I can not configure a wfs-t authentication. My query in
openlayers always gives error 401 and in geoserver log 'Failed login'
The request is
<wfs: Transaction service = "WFS" version = "1.1.0" xmlns: wfs =
"http://www.opengis.net/wfs" xmlns: cite =
"http://www.opengeospatial.net/cite" xmlns: gml =
"http://www.opengis.net/gml" xmlns: xsi =
"http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http:
//www.opengis .net / wfs
http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
http://www.opengeospatial.net/cite http://ip_adress:8080/geoserver/wfs/
DescribeFeatureType? Typename = cite: administration "> <wfs: Insert>
<cite: administration> <cite: geom> <gml: MultiSurface xmlns ="
http://www.opengis.net/gml "srsName =" EPSG: 2154 " <gml:
surfaceMember> <gml: Polygon srsName = "EPSG: 2154"> <gml: exterior>
<gml: LinearRing srsName = "EPSG: 2154"> <gml: posList srsDimension =
"2"> 793236.2285561005 5401066.196149358 793193.2327276901
5400993.3421067735 793272.0584131093 5400974.232849702 793300.7222987162
5401037.532263751 793236.2285561005 5401066.196149358 </ gml: posList>
</ gml: LinearRing> </ gml: exterior> </ gml: Polygon> </ gml:
surfaceMember> </ gml: MultiSurface> < / cite: geom> </ cite: Body> </
wfs: insert> </ wfs: Transaction>
and in openlayers I try:
var headers = new Headers ({
'Authorization': 'Basic' + btoa (username + ':' + password),
'Content-Type': 'application / x-www-form-urlencoded'
})
fetch ( 'http: // ip_adress: 8080 / geoserver / wfs', {
method: 'POST',
headers: headers,
body: request
}). then (function (response) {
return response.text ();
}). then (function (text) {
var result = text;
console.log ( 'result --------------------------------------------
------ ', result)
});
I set up a user group
I tried to put a data access rule for this layer - cite.administration.w
- but
it does not memorize. Even with reading the geoserver manual 2.15 I can
not do it.
Can you help me please ?
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users