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 for generic auth headers with pystac + validators #316

Merged
merged 1 commit into from Feb 13, 2024

Conversation

john-dupuy
Copy link
Contributor

@john-dupuy john-dupuy commented Apr 13, 2023

The aim of this PR is to build off of stac-utils/pystac#889 so that generic auth headers can be added to stac-api-validator and dependent requests that are made by pystac.

  • Adds an --auth-headers click option that can take a generic auth header dict as a string and attach it to dependent requests
  • Modifies the stac_io of the pystac Catalog so that the headers will be used as the catalog gets "walked"
  • Bumps the pystac version so that Add a mechanism for adding headers to StacIO requests pystac#889 is included
  • Bumps typeguard to 3.0.2

TODO:

  • documentation
  • tests

@john-dupuy john-dupuy marked this pull request as draft April 13, 2023 16:28
@john-dupuy john-dupuy marked this pull request as ready for review April 14, 2023 23:17
@john-dupuy john-dupuy changed the title Draft: Allow for generic auth headers with pystac + validators Allow for generic auth headers with pystac + validators Apr 14, 2023
@john-dupuy
Copy link
Contributor Author

@gadomski or @philvarner - could one of you take a look? First contribution to this repo so please let me know if anything is missing.

@philvarner
Copy link
Collaborator

@gadomski or @philvarner - could one of you take a look? First contribution to this repo so please let me know if anything is missing.

Thanks, I'll take a look this week.

tests/test_main.py Outdated Show resolved Hide resolved
src/stac_api_validator/validations.py Show resolved Hide resolved
src/stac_api_validator/validations.py Show resolved Hide resolved
src/stac_api_validator/__main__.py Outdated Show resolved Hide resolved
src/stac_api_validator/validations.py Outdated Show resolved Hide resolved
src/stac_api_validator/validations.py Outdated Show resolved Hide resolved
src/stac_api_validator/validations.py Outdated Show resolved Hide resolved
@john-dupuy
Copy link
Contributor Author

Thank you for the detailed review @gadomski! I will try to address this soon (likely next week).

collection or collection_id

Add a test to ensure auth headers arg works

Move function around

Fix mypy and suppress type checks for mocked test

Address review comments

Fix mypy
src/stac_api_validator/validations.py Show resolved Hide resolved
tests/test_main.py Show resolved Hide resolved
@jharrisonSV
Copy link
Contributor

Any movement on this 👀

@gadomski gadomski merged commit 6a38a74 into stac-utils:main Feb 13, 2024
7 checks passed
gadomski added a commit that referenced this pull request Feb 13, 2024
gadomski added a commit that referenced this pull request Feb 14, 2024
@gadomski
Copy link
Member

gadomski commented Feb 14, 2024

Note that this PR failed on main (probably not this PR's fault), so I reverted it in #391 and will re-open as a new PR so we can fix CI before merging: #392.

gadomski pushed a commit that referenced this pull request Feb 14, 2024
collection or collection_id

Add a test to ensure auth headers arg works

Move function around

Fix mypy and suppress type checks for mocked test

Address review comments

Fix mypy
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

Successfully merging this pull request may close these issues.

None yet

4 participants