Skip to content

Commit 571a6c4

Browse files
committed
add warnings for upgrading to 1.0.0-rc.2, handle pystac-exceptions, add auth to requests (partial)
1 parent a87bba6 commit 571a6c4

File tree

3 files changed

+194
-121
lines changed

3 files changed

+194
-121
lines changed

src/stac_api_validator/__main__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,22 @@
4949
),
5050
help="The conformance classes to validate.",
5151
)
52+
@click.option(
53+
"--auth-bearer-token",
54+
help="Authorization Bearer token value to append to all requests.",
55+
)
56+
@click.option(
57+
"--auth-query-parameter",
58+
help="Query pararmeter key and value to pass for authorization, e.g., 'key=xyz'.",
59+
)
5260
def main(
5361
log_level: str,
5462
root_url: str,
5563
conformance_classes: List[str],
5664
collection: Optional[str],
5765
geometry: Optional[str],
66+
auth_bearer_token: Optional[str] = None,
67+
auth_query_parameter: Optional[str] = None,
5868
) -> int:
5969
"""STAC API Validator."""
6070

@@ -66,6 +76,8 @@ def main(
6676
conformance_classes=conformance_classes,
6777
collection=collection,
6878
geometry=geometry,
79+
auth_bearer_token=auth_bearer_token,
80+
auth_query_parameter=auth_query_parameter,
6981
)
7082
except Exception as e:
7183
print(f"Failed.\nError {root_url}: {type(e)} {str(e)}")

0 commit comments

Comments
 (0)