Skip to content

Commit 6024840

Browse files
committed
get token from kwargs
1 parent f7d6884 commit 6024840

File tree

1 file changed

+3
-1
lines changed
  • stac_fastapi/core/stac_fastapi/core

1 file changed

+3
-1
lines changed

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async def item_collection(
280280
bbox: Optional[BBox] = None,
281281
datetime: Optional[DateTimeType] = None,
282282
limit: int = 10,
283-
token: str = None,
283+
token: Optional[str] = None,
284284
**kwargs,
285285
) -> stac_types.ItemCollection:
286286
"""Read items from a specific collection in the database.
@@ -302,6 +302,8 @@ async def item_collection(
302302
Exception: If any error occurs while reading the items from the database.
303303
"""
304304
request: Request = kwargs["request"]
305+
token = request.query_params.get('token')
306+
305307
base_url = str(request.base_url)
306308

307309
collection = await self.get_collection(

0 commit comments

Comments
 (0)