-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
I'm looking for a solution to add a JWT authorization header to each request like they did in this thread
Their solution for Swagger v2:
function addApiKeyAuthorization() {
var key = encodeURIComponent($('#input_apiKey')[0].value);
if (key && key.trim() != "") {
var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer " + key, "header");
window.swaggerUi.api.clientAuthorizations.add("bearer", apiKeyAuth);
log("added key " + key);
}
}
aaronfullerton, dinvlad, cbornet, fernandocamargoai, aberenyi and 20 more