From 18f831801446ac5c18d6abc41b73196e1af597c1 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 17 Jan 2017 10:34:50 +0100 Subject: [PATCH] Polishing. Add OkHttp3 to reference documentation. Add java hint to code fences. See gh-45. --- src/main/asciidoc/reference/authentication.adoc | 11 +++++++---- src/main/asciidoc/reference/client-support.adoc | 12 ++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/asciidoc/reference/authentication.adoc b/src/main/asciidoc/reference/authentication.adoc index e2a5665b..a5abbd6b 100644 --- a/src/main/asciidoc/reference/authentication.adoc +++ b/src/main/asciidoc/reference/authentication.adoc @@ -23,6 +23,7 @@ OS access levels. .Externalizing `vault.token` to a properties file ==== +[source, java] ---- @PropertySource("configuration.properties"), @Configuration @@ -98,8 +99,9 @@ class AppConfig extends AbstractVaultConfiguration { @Override public ClientAuthentication clientAuthentication() { - AppIdAuthenticationOptions options = AppIdAuthenticationOptions.builder().appId("myapp") // - .userIdMechanism(new IpAddressUserId()) // + AppIdAuthenticationOptions options = AppIdAuthenticationOptions.builder() + .appId("myapp") + .userIdMechanism(new IpAddressUserId()) .build(); return new AppIdAuthentication(options, vaultClient()); @@ -136,8 +138,9 @@ class AppConfig extends AbstractVaultConfiguration { @Override public ClientAuthentication clientAuthentication() { - AppIdAuthenticationOptions options = AppIdAuthenticationOptions.builder().appId("myapp") // - .userIdMechanism(new MacAddressUserId()) // + AppIdAuthenticationOptions options = AppIdAuthenticationOptions.builder() + .appId("myapp") + .userIdMechanism(new MacAddressUserId()) .build(); return new AppIdAuthentication(options, vaultClient()); diff --git a/src/main/asciidoc/reference/client-support.adoc b/src/main/asciidoc/reference/client-support.adoc index eea880fd..2c85435e 100644 --- a/src/main/asciidoc/reference/client-support.adoc +++ b/src/main/asciidoc/reference/client-support.adoc @@ -12,6 +12,7 @@ Spring Vault supports following HTTP clients: * Apache Http Components * Netty * OkHttp 2 +* OkHttp 3 Using a specific client requires the according dependency to be available on the classpath so Spring Vault can use the available client for communicating with Vault. @@ -64,3 +65,14 @@ dependencies to your project. You can omit the version number if using ---- ==== + +.Square OkHttp 3 +==== +[source, xml] +---- + + com.squareup.okhttp3 + okhttp + +---- +====