Hi Uwe, I would have made a subclass of WFSClient. In that way you could control the headers-field that are used when creating GetFeatureRequest.
The WFSDataStore have a single constructor that takes a WFSClient, so that shouldn't be a problem. You should maybe take a look at WFSDataStoreFactor.createDataStore, and see how the WFSDataStore are created. There are some setup function calls that might be necessary. First of all I would've upgraded to a newer version of GeoTools. Best regards, Roar Brænden > 9. apr. 2024 kl. 15:16 skrev Uwe Kickstein <uwe.kickst...@data-experts.de>: > > Hello everyone, > > > > what would be the best way to realize WFS communication with a bearer-token > based authentication. The token can vary for each GetFeature request. > Actually I'm using geotools in Version 28.4. > I already recognized the change in Version 30.2, where you can put additional > headers in the WFSConfig and pass them to the WFSClient. > But i don't want to create a new WFSClient for each GetFeature request, > because of the overhead (GetCapabilities and DescribeFeatureType request). > Any suggestions are welcome. > > best regards > Uwe > _______________________________________________ > GeoTools-GT2-Users mailing list > GeoTools-GT2-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users