Open mtiessen1175 opened 2 months ago
I'd recommend to store the credentials when the WMS layer is created (on the volume edit page) and then store them encrypted in the WMS JSON column. Then the layer can be used by all users who have access to the volume.
@tschoeni, I used the PHP file_get_contents()
function to access the WMS here. It should be possible to provide authentication parameters via the $context
parameter (see here).
What I would have to do in the getCapabilities()
method is to somehow catch the XML exception (LayerNotDefined which you showed me earlier). This should trigger an authentication dialog for the user to provide the access-credentials (and store them as @mzur suggested above).
You can also always allow the user to enter credentials when they create a new layer. If the WMS requires authentication but the user didn't enter credentials, loading can just fail with a helpful error message. The user will figure it out.
Web map services that require authentication (username & password) are not yet supported in the geo-overlay upload. This would be highly desired according to an expert user.
Possible steps: