A chrome extension to add an auto login button to swagger ui
- Download or clone this repository.
- Go to
Settings > Extensions
in Chrome. - Make sure Developer mode is enabled.
- Click
Load unpacked extension...
. - Select the directory where you saved this project.
Clicking this extension's icon brings up a popup where you can enter your username and password.
After saving your credentials you can click the 'Log In' button which has now been added to swagger ui pages to have the extension automatically set your auth token.
This currently only works if the endpoint for getting your auth token is /auth/login
. It also assumes that the response is in the form of
{
"token": "ey......"
}
This is because it is what I need right now. However, this should be very easy to customize if needed, just have a look at the source.