I use django, drf and drf-spectacular. I create swagger documentation. Some endpoints require authentication. I can authenticate in swagger by pressing authorize and filling in the token.
I would like that this filled in automatically for me. How do I do that?
I tried to add preauthorizeApiKey to my settings, like this:
SPECTACULAR_SETTINGS = {
'SWAGGER_UI_SETTINGS': {
'preauthorizeApiKey': 'Token my-secret-token'
}
}
It doesnt work.