Solved

Include layer in maps component which needs bearer authentication

  • 20 October 2023
  • 1 reply
  • 67 views

Badge

We like to include a layer in the maps component for which authentication via bearer authentication is required. However, we cannot find how to configure this method of authentication for a layer. Can you please help us?

icon

Best answer by Anne Buit 30 October 2023, 11:04

View original

This topic has been closed for comments

1 reply

Userlevel 7
Badge +5

Hi Richard,

Adding an additional bearer authentication header for a layer is currently not possible.

The bearer authentication tokens are generally speaking short-lived and depend on a flow to retrieve such a token, like OAuth2. This cannot be done by the server and browser via authentication challenges and requires actual implementation of the flow by the client code.

The maps component is built with authentication via a token in the URL in mind, where the token is long-lived and can be included in the model.

To support your scenario, you’d probably have to set up a proxy webservice for the tile layer and inject the bearer token (and perform token renewal) in the proxy.