Mentorship-backend: Add single Authorization Token field to avoid copy pasting everytime in the requests | CROSS PROJECT ISSUE

Created on 23 Feb 2021  路  4Comments  路  Source: anitab-org/mentorship-backend

Is your feature request related to a problem? Please describe.
Refer conversation here : https://github.com/anitab-org/bridge-in-tech-backend/issues/196

Currently every request requires to enter the Authorisation Token every time, instead what we can do is add a single field for Authorisation so we don't have to enter it every time.

Describe the solution you'd like
Currently in every request we have a field like this,

Screenshot 2021-02-18 at 10 43 04 AM

We can replace it with this,

https://user-images.githubusercontent.com/32628578/108309136-01f9fd80-71d7-11eb-97f1-80c5c357861b.mov

Here we just have to login once and then we can access all the locked routes as shown in the video (We don't have to enter Authorization Token again and again)

This can be achieved by modifying the swagger docs settings in the settings.py.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Most helpful comment

As I said in the Bridge in Tech session, there is actually a use case / need for having this token entry for each endpoint. Mentorship system requires interactions between users, when I test only using the API: User A sends request and User B accepts request, I need to use 2 different JWT tokens. So having 1 time input of the JWT token, would not allow us to test on Swagger UI these interactions.

I will close the issue, but please let me know if you have counter arguments to what I said, @sahil9001

cc @mtreacy002 @epicadk @sahil9001

All 4 comments

@mtreacy002 @epicadk

Linking to this issue that is open on the bridge in tech backend.

As I said in the Bridge in Tech session, there is actually a use case / need for having this token entry for each endpoint. Mentorship system requires interactions between users, when I test only using the API: User A sends request and User B accepts request, I need to use 2 different JWT tokens. So having 1 time input of the JWT token, would not allow us to test on Swagger UI these interactions.

I will close the issue, but please let me know if you have counter arguments to what I said, @sahil9001

cc @mtreacy002 @epicadk @sahil9001

Okay @isabelcosta ! I get you, thanks!

Was this page helpful?
0 / 5 - 0 ratings