Why do it?
LuciadLightspeed includes an OGC Web Client Suite API, which allows you to connect your LuciadLightspeed-based application with OGC web services. In practice, such web services are frequently access-restricted: they require authentication through a user name and a password before they grant access.
How to do it?
In this article, we focus on HTTP Basic Authentication, a simple but common authentication approach for HTTP-based communication. Within this approach, a service informs the client of an authentication requirement through an HTTP response code. The client then supplies the required credentials through an HTTP header encoded with Base64.
If you are using Lucy as your OGC client, it will automatically show a login panel when an OGC service requires credentials.
If you are working directly with the LuciadLightspeed API, you have to supply credentials as follows:
TLcdOWSHttpTransportinstance and supply the credentials through the constructor. The class
TLcdOWSHttpTransportis used by the OGC Web Client Suite to handle the communication with a service.
TLcdOWSHttpTransportinstance to create a model for the OGC web service. The type of OGC service determines how you can create the model:
WMTS: supply the transport to the constructor of
WCS: supply the transport to one of the
TLcdWCSClient; ; you can supply the resulting
TLcdWCSClientinstance to one of the
WFS: supply the transport to one of the
TLcdWFSClient; you can supply the resulting
TLcdWFSClientinstance to one of the
WMS: supply the transport to one of the
TLcdWMSClient; you can supply the resulting
TLcdWMSClientinstance to the