简体   繁体   中英

drf-yasg - How to customize persistent auth token?

I am using drf-yasg to generate open API, what I want is once I have added the token for authentication it should be persistent and should not expire when user refreshes the page. Currently if user refreshes the page the token gets lost and user again needs to enter the token again and again after any single change.

when using drf-yasg, you can configure settings in SWAGGER_SETTINGS in your settings.py . add 'PERSIST_AUTH': True into SWAGGER_SETTINGS would work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM