Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to include HTTP authentication on data requests #6704

Open
ashleysommer opened this issue Feb 22, 2023 · 2 comments
Open

Add ability to include HTTP authentication on data requests #6704

ashleysommer opened this issue Feb 22, 2023 · 2 comments

Comments

@ashleysommer
Copy link
Contributor

ashleysommer commented Feb 22, 2023

I am referring in particular to WPS requests, but the same question could be asked of WMS/WCS layer requests too.

I have a WPS server that is adding the requirement of token authentication. All (getcapabilities, describeprocess, execute) requests must include one of:

  • Authorization with "Bearer <myapikey>"
  • Authorization header with "APIKey-1 <terntoken>"
  • HTTP Basic auth with credentials "apikey:<terntoken>"

Any of these options will work, but TerriaJS doesn't have the ability at add any form of credentialisation that I am aware of.

@whatnick
Copy link
Contributor

Looks like the override of fetch and the ES6 fetch API can be made to send API requests with authentication headers to other origins.

https://developer.mozilla.org/en-US/docs/Web/API/fetch#credentials

@nf-s
Copy link
Contributor

nf-s commented Mar 5, 2024

Hi @ashleysommer

TerriaJS currently doesn't have a way to add credentials to requests - TerriaJS-server does have the proxyAuth function which allows credentials to be added to requests without revealing them to users

For example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants