From 6ecc569abd2c4f7e902b1dc15c3fea3809a741ec Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Tue, 10 Feb 2015 12:15:20 +0000 Subject: [PATCH] SPNEGO auth fix: Authentication scheme should be set as String Default authentication scheme is a String and must be later on decoded as Realm enum --- .../src/main/resources/scala/apiInvoker.mustache | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache b/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache index cb6ab2798f96..186be3640143 100644 --- a/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache +++ b/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache @@ -167,6 +167,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper, case true => { import org.sonatype.spice.jersey.client.ahc.config.DefaultAhcConfig import org.sonatype.spice.jersey.client.ahc.AhcHttpClient + import com.ning.http.client.Realm val config: DefaultAhcConfig = new DefaultAhcConfig() if (!authScheme.isEmpty) { @@ -185,7 +186,7 @@ object ApiInvoker extends ApiInvoker(mapper = ScalaJsonUtil.getJsonMapper, httpHeaders = HashMap(), hostMap = HashMap(), asyncHttpClient = {{asyncHttpClient}}, - authScheme = {{authScheme}}, + authScheme = "{{authScheme}}", authPreemptive = {{authPreemptive}}) class ApiException(val code: Int, msg: String) extends RuntimeException(msg)