diff --git a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenServiceAutoConfiguration.java b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenServiceAutoConfiguration.java index c57766e61cc..007f512f24f 100644 --- a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenServiceAutoConfiguration.java +++ b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenServiceAutoConfiguration.java @@ -18,8 +18,8 @@ @AutoConfiguration(after = ClientCredentialAutoConfiguration.class) public class TokenServiceAutoConfiguration { - @Value("${http.proxy:#{null}}") - private String proxyHost; + @Value("${HTTP_PROXY:#{null}}") + private String httpProxy; @Primary @Bean @@ -40,7 +40,7 @@ AzureTokenService azureAdTokenService( GetAuthenticatedToken getAuthenticatedToken ) { Assert.notNull(issuerUrl, "AAD_ISSUER_URI must be set"); - return new AzureTokenService(proxyHost, issuerUrl, clientCredential, getAuthenticatedToken); + return new AzureTokenService(httpProxy, issuerUrl, clientCredential, getAuthenticatedToken); } @Primary @@ -58,7 +58,7 @@ AzureNavTokenService azureNavTokenServiceTest( AzureNavTokenService azureNavTokenService( AzureNavClientCredential azureNavClientCredential ) { - return new AzureNavTokenService(proxyHost, azureNavClientCredential); + return new AzureNavTokenService(httpProxy, azureNavClientCredential); } @Primary @@ -80,7 +80,7 @@ AzureTrygdeetatenTokenService trygdeetatenAzureAdTokenService( GetAuthenticatedUserId getAuthenticatedUserId, ObjectMapper objectMapper ) { - return new AzureTrygdeetatenTokenService(proxyHost, clientCredential, getAuthenticatedUserId, objectMapper); + return new AzureTrygdeetatenTokenService(httpProxy, clientCredential, getAuthenticatedUserId, objectMapper); } } diff --git a/libs/reactive-security/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/libs/reactive-security/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 00000000000..2018d3e877b --- /dev/null +++ b/libs/reactive-security/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,9 @@ +{ + "properties": [ + { + "name": "HTTP_PROXY", + "type": "java.lang.String", + "description": "Satt av NAIS i pod, hvis NAIS-manifestet har spec.webproxy." + } + ] +} \ No newline at end of file