From be16418adb40d87d9c2a971196be3c4dc7ef4661 Mon Sep 17 00:00:00 2001 From: madsleegiil Date: Wed, 16 Feb 2022 12:36:37 +0100 Subject: [PATCH] =?UTF-8?q?Legg=20tilbake=20eksempel=20p=C3=A5=20endepunkt?= =?UTF-8?q?=20uten=20annotasjon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1958db2c..aae66eb6 100644 --- a/README.md +++ b/README.md @@ -160,8 +160,8 @@ This example shows - First method - An unprotected endpoint. No token is required to use this endpoint. - Second method - A protected endpoint. This endpoint will require a valid token from one of the configured issuers. - Third method - A protected endpoint. This endpoint will require a valid token from the "employee" or "manager" issuer. -- Fourth method - A protected endpoint. This endpoint will require a valid token from the "manager" issuer and a claim where key is "acr" and value is "Level4" - +- Fourth method - A protected endpoint. This endpoint will require a valid token from the "manager" issuer and a claim where key is "acr" and value is "Level4". +- Fifth method - A non-annotated endpoint. This endpoint will not be accessible from outside the server (will return a 501 NOT_IMPLEMENTED). ```java @Path("/rest") public class ProductResource { @@ -198,6 +198,12 @@ public class ProductResource { public void add(String id) { return service.delete(id); } + + @GET + @PATH("/product/{id}") + public void add(String id) { + return service.get(id); + } } ```