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

Allow planetary_computer.sign_url to refresh token of signed URLs #65

Open
bmcandr opened this issue Nov 14, 2024 · 0 comments
Open

Allow planetary_computer.sign_url to refresh token of signed URLs #65

bmcandr opened this issue Nov 14, 2024 · 0 comments

Comments

@bmcandr
Copy link

bmcandr commented Nov 14, 2024

The sign_url function checks whether SAS token query parameters are present and, if present, returns the URL unaltered:

parsed_qs = parse_qs(parsed_url.query)
if set(parsed_qs) & {"st", "se", "sp"}:
# looks like we've already signed it
return url

Is it possible to allow this function to refresh the token of signed URLs by checking the expiration datetime of the se query parameter?

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

1 participant