Skip to main content
Solved

Include layer in maps component which needs bearer authentication

  • October 20, 2023
  • 1 reply
  • 73 views

Forum|alt.badge.img

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?

Best answer by Anne Buit

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.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 637 replies
  • Answer
  • October 30, 2023

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings