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

Clarify: Send token to discovery endpoints #416 #417

Merged
merged 4 commits into from
Nov 2, 2021
Merged

Clarify: Send token to discovery endpoints #416 #417

merged 4 commits into from
Nov 2, 2021

Conversation

m-mohr
Copy link
Member

@m-mohr m-mohr commented Oct 19, 2021

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 m-mohr added the patch requires a patch-version (x.x.1 for example) label Oct 19, 2021
@m-mohr m-mohr added this to the 1.2.0 milestone Oct 19, 2021
@m-mohr m-mohr requested review from soxofaan, jdries and flahn October 19, 2021 10:18
@m-mohr m-mohr linked an issue Oct 19, 2021 that may be closed by this pull request
Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general: clarification seem bit oriented to web editor or comparable interactive interfaces, where you for example a collection listing widget that should update once user is logged in.

In case of python or R client, the recommendation makes less sense as it's the responsibility of the user to re-request collections listings and update all relevant variables they created. This is out of reach nor the responsibility of the client libraries I think.

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

openapi.yaml Outdated Show resolved Hide resolved
@m-mohr
Copy link
Member Author

m-mohr commented Oct 19, 2021

@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.

Co-authored-by: Stefaan Lippens <[email protected]>
@m-mohr m-mohr requested a review from soxofaan October 19, 2021 13:27
@soxofaan
Copy link
Member

In the Python client there is (currently) caching of

  • /
  • /file_formats
  • /service_types
  • /udf_runtimes
  • /processes

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
Copy link
Member Author

m-mohr commented Oct 19, 2021

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
Copy link
Member

soxofaan commented Oct 19, 2021

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)

@m-mohr m-mohr requested a review from dthiex October 20, 2021 08:24
@m-mohr m-mohr merged commit e0f1c83 into draft Nov 2, 2021
@m-mohr m-mohr deleted the issue-416 branch November 2, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch requires a patch-version (x.x.1 for example)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify: Send token to discovery endpoints
3 participants