forked from jazzband/djangorestframework-simplejwt
-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Right now all models allow extra fields:
django-ninja-jwt/ninja_jwt/schema.py
Line 100 in 2fb51bf
# extra = "allow" |
I don't want that behavior, I want to be strict on my input types: no extras are allowed in authentication.
So, how to change that?
Now I have to change all settings in
NINJA_JWT = {
'TOKEN_OBTAIN_PAIR_INPUT_SCHEMA': "custom",
'TOKEN_OBTAIN_PAIR_REFRESH_INPUT_SCHEMA': "custom",
'TOKEN_VERIFY_INPUT_SCHEMA': "custom",
}
To only change one configuration option.
I would like to see something like:
NINJA_JWT = {
'SCHEMAS_EXTRA': 'forbid', # with 'allow' as default for backward-compat
}
See https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.extra
Metadata
Metadata
Assignees
Labels
No labels