requests
Utility functions for working with HTTP requests.
MatchResult
dataclass
¶
Result of a match between a path and method and a set of endpoints.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
is_private
|
bool
|
|
required |
required_scopes
|
Sequence[str]
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
Source code in src/stac_auth_proxy/utils/requests.py
77 78 79 80 81 82 |
|
dict_to_bytes(d: dict) -> bytes
¶
Convert a dictionary to a body.
Source code in src/stac_auth_proxy/utils/requests.py
24 25 26 |
|
extract_variables(url: str) -> dict
¶
Extract variables from a URL path. Being that we use a catch-all endpoint for the proxy, we can't rely on the path parameters that FastAPI provides.
Source code in src/stac_auth_proxy/utils/requests.py
12 13 14 15 16 17 18 19 20 21 |
|
find_match(path: str, method: str, private_endpoints: EndpointMethods, public_endpoints: EndpointMethods, default_public: bool) -> MatchResult
¶
Check if the given path and method match any of the regex patterns and methods in the endpoints.
Source code in src/stac_auth_proxy/utils/requests.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|