IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
627 stars 143 forks source link

FIX to Pydantic 2 #100

Open abercromb opened 10 months ago

yudytskiy commented 9 months ago

I would not recomend to remove each_item=True parameter from validators. Just import Set and replace Sequence with Set:

-from typing import Optional, Union, Sequence, List
+from typing import Optional, Union, Sequence, List, Set
...
-     authjwt_token_location: Optional[Sequence[StrictStr]] = {'headers'}
+     authjwt_token_location: Optional[Set[StrictStr]] = {'headers'}
...
...
ugolbck commented 4 months ago

Hi @IndominusByte could you please consider those changes? Thank you