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
630 stars 143 forks source link

The subject below the create_access_token function wants to be able to support dict #43

Closed iasukas closed 3 years ago

iasukas commented 3 years ago

In my project, I need subject support dict, like this subject={"uid":1, "scope":"AdminScope"}, I can find the corresponding class AdminScope by reflection, But now only support int and strings. I can only do this by concatenating strings, which is a hassle rather than using dict directly

SamiAlsubhi commented 3 years ago

Use additional claims. Please refer to documentation.