Skip to content

Commit f7ec24f

Browse files
committed
Scopes don't make sense with public endpoints
1 parent 805d7de commit f7ec24f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stac_auth_proxy/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
from pydantic_settings import BaseSettings, SettingsConfigDict
99

1010
METHODS = Literal["GET", "POST", "PUT", "DELETE", "PATCH"]
11+
EndpointMethodsNoScope: TypeAlias = dict[str, Sequence[METHODS]]
1112
EndpointMethods: TypeAlias = dict[
1213
str, Sequence[Union[METHODS, tuple[METHODS, Sequence[str]]]]
1314
]
15+
1416
_PREFIX_PATTERN = r"^/.*$"
1517

1618

@@ -45,7 +47,7 @@ class Settings(BaseSettings):
4547

4648
# Auth
4749
default_public: bool = False
48-
public_endpoints: EndpointMethods = {
50+
public_endpoints: EndpointMethodsNoScope = {
4951
r"^/api.html$": ["GET"],
5052
r"^/api$": ["GET"],
5153
r"^/healthz": ["GET"],

0 commit comments

Comments
 (0)