diff --git a/src/Jlapp/Swaggervel/routes.php b/src/Jlapp/Swaggervel/routes.php index 5d845d2..6802c6d 100644 --- a/src/Jlapp/Swaggervel/routes.php +++ b/src/Jlapp/Swaggervel/routes.php @@ -60,6 +60,7 @@ 'clientSecret' => Input::get("client_secret"), 'realm' => Input::get("realm"), 'appName' => Input::get("appName"), + 'apiKey' => Config::get("swaggervel.api-key") ) ); diff --git a/src/views/index.blade.php b/src/views/index.blade.php index 9103cc2..962d651 100644 --- a/src/views/index.blade.php +++ b/src/views/index.blade.php @@ -103,7 +103,7 @@ function log() { function addApiKeyAuthorization() { var key = encodeURIComponent($('#input_apiKey')[0].value); if (key && key.trim() != "") { - var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query"); + var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("{!! $apiKey !!}", key, "query"); window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth); log("added key " + key); } @@ -135,7 +135,7 @@ function addApiKeyAuthorization() { swagger