Closed kamil-wisniewski closed 7 years ago
Hi @banditeye
Thanks for trying!
https://github.com/swagger-api/swagger-ui#header-parameters According to it, we can set custom header from browser console. For example, the example below worked for me.
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("authorization", "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiZXhwIjoxNDg5MDI0NTU1fQ.wNsEseSroEja_ya_29GCrlkI0GemN5OocyQN9pQ9niMcOEqWxhynT1u9WFJDIkq4bQPbemZgUzmnPouPjPD7rw", "header"));
As a note, you have to get jwt token at first from /api/auth.
Hi ! I have a problem with testing controller in swagger if access is protected. Can you explain me how I can do that's? How I can simulate loged user?