Open-EO / openeo-api

The openEO API specification
http://api.openeo.org
Apache License 2.0
91 stars 11 forks source link

Clarify: Send token to discovery endpoints #416 #417

Closed m-mohr closed 2 years ago

m-mohr commented 2 years ago

See issue #416 and discussions around private collections in openEO Platform.

This is not really a new thing, but more a clarification for clients that this behavior can be useful.

m-mohr commented 2 years ago

@soxofaan Sure, the primary use case that comes to mind is the Web Editor, but it's not the only use case. It depends on whether you are storing e.g. a collection or processes cache in the client, which I think is at least true in the JS client and R client for processes. So once logged in these caches would need to be cleared/updated.

For example: I'm not sure what makes sense to do in python client to cover this clarification at the moment.

Not sure whether it's implemented yet, but you'd need to send the Bearer token to the discovery endpoints if available. I'm not sure all (programming) clients do that yet. If Python does it, then there's probably nothing to do, indeed.

soxofaan commented 2 years ago

In the Python client there is (currently) caching of

only / is authentication-independent, so the other ones should be re-fetched ? Shouldn't be easy actually: just clear cache when auth changes.

m-mohr commented 2 years ago

only / is authentication-independent, so the other ones should be re-fetched ?

Yes.

Shouldn't be easy actually

I guess that meant "Should be easy"?

Is the Python client sending the Bearer token to Collections etc if available?

soxofaan commented 2 years ago

I guess that meant "Should be easy"?

indeed :)

Is the Python client sending the Bearer token to Collections etc if available?

python client always sends bearer if available (even if not necessary)