diff --git a/docs/src/main/asciidoc/mp/guides/security-oidc.adoc b/docs/src/main/asciidoc/mp/guides/security-oidc.adoc index 94080f6cd90..05f66ab88bf 100644 --- a/docs/src/main/asciidoc/mp/guides/security-oidc.adoc +++ b/docs/src/main/asciidoc/mp/guides/security-oidc.adoc @@ -233,8 +233,12 @@ cd helidon-quickstart-mp Update the pom.xml file and add the following Helidon dependency to the `` section. [source,xml] -.Add the following dependency to `pom.xml`: +.Add the following dependencies to `pom.xml`: ---- + + io.helidon.microprofile + helidon-microprofile-security + io.helidon.microprofile helidon-microprofile-oidc diff --git a/docs/src/main/asciidoc/se/guides/security-oidc.adoc b/docs/src/main/asciidoc/se/guides/security-oidc.adoc index b940b811f52..ebb79dd0e5c 100644 --- a/docs/src/main/asciidoc/se/guides/security-oidc.adoc +++ b/docs/src/main/asciidoc/se/guides/security-oidc.adoc @@ -230,14 +230,28 @@ cd helidon-quickstart-se Update the pom.xml file and add the following Helidon dependency to the `` section. [source,xml] -.Add the following dependency to `pom.xml`: +.Add the following dependencies to `pom.xml`: ---- + + io.helidon.webserver + helidon-webserver-security + io.helidon.security.providers helidon-security-providers-oidc ---- +[source,xml] +.Remove the `test` scope from `helidon-webclient` dependency +---- + + io.helidon.webclient + helidon-webclient + test + +---- + === Add OIDC Security Properties The OIDC security provider configuration can be joined to helidon configuration file. diff --git a/docs/src/main/java/io/helidon/docs/mp/guides/SecurityOidcSnippets.java b/docs/src/main/java/io/helidon/docs/mp/guides/SecurityOidcSnippets.java index b89a416b22d..0f2221815a9 100644 --- a/docs/src/main/java/io/helidon/docs/mp/guides/SecurityOidcSnippets.java +++ b/docs/src/main/java/io/helidon/docs/mp/guides/SecurityOidcSnippets.java @@ -36,12 +36,12 @@ class SecurityOidcSnippets { // stub - static GreetingMessage createResponse(String str) { + static Message createResponse(String str) { return null; } // stub - record GreetingMessage() { + record Message() { String getMessage() { return ""; } @@ -51,7 +51,7 @@ String getMessage() { @Authenticated @GET @Produces(MediaType.APPLICATION_JSON) - public GreetingMessage getDefaultMessage() { + public Message getDefaultMessage() { return createResponse("World"); } // end::snippet_1[] @@ -76,11 +76,11 @@ void snippet_5(WebTarget target) { void snippet_6(WebTarget target) { // tag::snippet_4[] String encoding = Base64.getEncoder().encodeToString("jack:changeit".getBytes()); - GreetingMessage jsonMessage = target + Message jsonMessage = target .path("greet") .request() .header(HttpHeaders.AUTHORIZATION, "Basic " + encoding) - .get(GreetingMessage.class); + .get(Message.class); assertThat(jsonMessage.getMessage(), is("Hello World!")); // end::snippet_4[]