Skip to content

Commit

Permalink
Rm maybe auth check for public endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Jan 3, 2025
1 parent 39dd77b commit b89cfce
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/stac_auth_proxy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI:
else openapi_handler
),
methods=methods,
dependencies=[Security(auth_scheme.maybe_validated_user)],
dependencies=[],
)

# Catchall for remainder of the endpoints
Expand All @@ -80,13 +80,7 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI:
proxy_handler.stream,
methods=["GET", "POST", "PUT", "PATCH", "DELETE"],
dependencies=(
[
Security(
auth_scheme.maybe_validated_user
if settings.default_public
else auth_scheme.validated_user
)
]
[] if settings.default_public else [Security(auth_scheme.validated_user)]
),
)

Expand Down

0 comments on commit b89cfce

Please sign in to comment.