how can i change security name in django swagger specticuler?

Question:

[enter image description here][1]

please follow this image to clarify my issue
[1]: https://i.stack.imgur.com/ah0fD.png
how can i change security name like i got by default from Django swagger spectacular (jwtauth).i want to rename it so what i have to change in my settings.py file. please fixed my issue

in settings.py

   SPECTACULAR_SETTINGS = {
    'TITLE': 'title',
    'VERSION': '1.0.0',
    'SERVE_INCLUDE_SCHEMA': False,
    'CONTACT': {'name':'name','email':'[email protected]'},
    'SCHEMA_PATH_PREFIX_TRIM': True,
    'SERVERS': [{'url': env('SWAGGER_SERVER')},],
    'PREPROCESSING_HOOKS': ["custom.url_remover.preprocessing_filter_spec"],  
    }

in django by default schema and swagger generation i am not able to solve this issue

Asked By: Deepak Kumar

||

Answers:

Just put this code in views.py:

from drf_spectacular.contrib.rest_framework_simplejwt import SimpleJWTScheme
    
class authtoken(SimpleJWTScheme):
        name = 'bearerAuth'
        priority = 1
Answered By: Umang Bhadja
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.