Skip to content

GetLegendGraphic does not manage Bearer token #10506

Closed

Description

Description

in certain projects a login form appears is because the GetLegendGraphic is not sending the bearer token as the other requests are doing causing an authorization error

Adding the token this requests work. The problem resides in how authentication is managed for the GetLegendGraphic, in particular here (from current master)

https://github.com/geosolutions-it/MapStore2/blob/master/web/client/utils/SecurityUtils.js#L175-L198

We should manage differently how bearer token can be added to the request using headers instead, by editing here

https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/TOC/components/Legend.jsx#L104

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions