Add API Key auth in onComplete callback of SwaggerUI#load call

This commit is contained in:
Mohsen Azimi
2015-04-15 14:44:35 -07:00
parent 854ef16cbb
commit b579783ba0
3 changed files with 10 additions and 10 deletions

View File

@@ -277,7 +277,7 @@ window.onOAuthComplete = function onOAuthComplete(token) {
}
}
});
window.authorizations.add(oauth2KeyName, new ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
window.swaggerUi.api.clientAuthorizations.add(oauth2KeyName, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
}
}
}