diff --git a/examples/mp-rest-jwt-principal/README.adoc b/examples/mp-rest-jwt-principal/README.adoc
new file mode 100644
index 00000000000..5fc3dbdb489
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/README.adoc
@@ -0,0 +1,103 @@
+= MicroProfile JWT Principal
+:index-group: MicroProfile
+:jbake-type: page
+:jbake-status: published
+
+This is an example on how to use MicroProfile JWT in TomEE by accessing
+Principal from the JsonWebToken.
+
+== Run the application:
+
+[source, bash]
+----
+mvn clean install tomee:run
+----
+
+This example is a CRUD application for orders in store.
+
+== Requirments and configuration
+
+For usage of MicroProfile JWT we have to change the following to our
+project:
+
+[arabic]
+. Add the dependency to our `pom.xml` file:
++
+....
+
+ org.eclipse.microprofile.jwt
+ microprofile-jwt-auth-api
+ ${mp-jwt.version}
+ provided
+
+....
+. Annotate our `Application.class` with `@LoginConfig(authMethod = "MP-JWT")`
+
+. Provide public and private key for authentication. And specify the location of the public key and the issuer in our
+`microprofile-config.properties` file.
++
+[source,properties]
+----
+mp.jwt.verify.publickey.location=/publicKey.pem
+mp.jwt.verify.issuer=https://example.com
+----
+
+. Define `@RolesAllowed()` on the endpoints we want to protect.
+
+== Obtaining the JWT Principal
+
+We obtain the `Principal` in the MicroProfile class `org.eclipse.microprofile.jwt.JsonWebToken`. From there
+we can acquire username and groups of the user that is accessing the endpoint.
+
+[source,java]
+----
+@Inject
+private JsonWebToken jwtPrincipal;
+----
+
+== About the application architecture
+
+The application enables us to manipulate orders with specific users. We have two users `Alice Wonder`
+and `John Doe`. They can read, create, edit and delete specific entries. And for each creation
+we save the user who created the order. In case a user edits the entry we record that by accessing
+the `Principal` who has sent the request to our backend.
+
+`alice-wonder-jwt.json`
+
+[source,json]
+----
+{
+ "iss": "https://example.com",
+ "upn": "alice",
+ "sub": "alice.wonder@example.com",
+ "name": "Alice Wonder",
+ "iat": 1516239022,
+ "groups": [
+ "buyer"
+ ]
+}
+----
+
+`john-doe-jwt.json`
+[source,json]
+----
+{
+ "iss": "https://example.com",
+ "upn": "john",
+ "sub": "john.doe@example.com",
+ "name": "John Doe",
+ "iat": 1516239022,
+ "groups": [
+ "merchant"
+ ]
+}
+----
+
+== Access the endpoints with JWT token
+
+We access endpoints from our test class by creating a `JWT` with the help of
+our `TokenUtils.generateJWTString(String jsonResource)` which signs our user
+data in json format with the help of our `src/test/resources/privateKey.pem` key.
+
+We can also generate new `privateKey.pem` and `publicKey.pem` with the
+`GenerateKeyUtils.generateKeyPair(String keyAlgorithm, int keySize)` method.
\ No newline at end of file
diff --git a/examples/mp-rest-jwt-principal/pom.xml b/examples/mp-rest-jwt-principal/pom.xml
new file mode 100644
index 00000000000..cf9bb05ed80
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/pom.xml
@@ -0,0 +1,184 @@
+
+
+
+ 4.0.0
+
+ org.superbiz
+ mp-rest-jwt-principal
+ 8.0.0-SNAPSHOT
+ war
+ OpenEJB :: Examples :: MP REST JWT PRINCIPAL
+
+
+ UTF-8
+ 8.0.0-SNAPSHOT
+ 4.23
+ 1.4.1.Final
+ 1.1.1
+ 1.0
+ 1.1
+
+
+
+ install
+ phonestore
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.18.1
+
+ false
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.5.1
+
+ 1.8
+ 1.8
+
+
+
+ org.apache.tomee.maven
+ tomee-maven-plugin
+ ${tomee.version}
+
+ microprofile
+ -Xmx512m -XX:PermSize=256m
+ ${project.basedir}/src/main/tomee/
+
+
+
+
+
+
+
+
+
+ org.jboss.arquillian
+ arquillian-bom
+ ${arquillian-bom.version}
+ import
+ pom
+
+
+
+
+
+
+
+ org.apache.tomee
+ javaee-api
+ 8.0
+ provided
+
+
+ org.eclipse.microprofile.jwt
+ microprofile-jwt-auth-api
+ ${mp-jwt.version}
+ provided
+
+
+ org.eclipse.microprofile.rest.client
+ microprofile-rest-client-api
+ ${mp-rest-client.version}
+ provided
+
+
+ org.eclipse.microprofile.config
+ microprofile-config-api
+ ${mp-config.version}
+ provided
+
+
+ com.nimbusds
+ nimbus-jose-jwt
+ ${junit.version}
+ test
+
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+ org.jboss.arquillian.junit
+ arquillian-junit-container
+ test
+
+
+
+
+
+ arquillian-tomee-remote
+
+ true
+
+
+
+ org.apache.tomee
+ arquillian-tomee-remote
+ ${tomee.version}
+ test
+
+
+ org.apache.tomee
+ apache-tomee
+ ${tomee.version}
+ zip
+ microprofile
+ test
+
+
+ org.apache.tomee
+ mp-jwt
+ ${tomee.version}
+ provided
+
+
+
+
+
+
+
+
+ localhost
+ file://${basedir}/target/repo/
+
+
+ localhost
+ file://${basedir}/target/snapshot-repo/
+
+
+
diff --git a/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Order.java b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Order.java
new file mode 100644
index 00000000000..26a25bf0ccb
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Order.java
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store.entity;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class Order {
+
+ private Integer id;
+ private String createdUser;
+ private String updatedUser;
+ private BigDecimal orderPrice;
+ private List products;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getCreatedUser() {
+ return createdUser;
+ }
+
+ public void setCreatedUser(String createdUser) {
+ this.createdUser = createdUser;
+ }
+
+ public String getUpdatedUser() {
+ return updatedUser;
+ }
+
+ public void setUpdatedUser(String updatedUser) {
+ this.updatedUser = updatedUser;
+ }
+
+ public BigDecimal getOrderPrice() {
+ return orderPrice;
+ }
+
+ public void setOrderPrice(BigDecimal orderPrice) {
+ this.orderPrice = orderPrice;
+ }
+
+ public List getProducts() {
+ return products;
+ }
+
+ public void setProducts(List products) {
+ this.products = products;
+ }
+}
diff --git a/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Product.java b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Product.java
new file mode 100644
index 00000000000..4940e7e777c
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/entity/Product.java
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store.entity;
+
+import java.math.BigDecimal;
+
+public class Product {
+
+ private Integer id;
+ private String name;
+ private BigDecimal price;
+ private Integer stock;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price) {
+ this.price = price;
+ }
+
+ public Integer getStock() {
+ return stock;
+ }
+
+ public void setStock(Integer stock) {
+ this.stock = stock;
+ }
+
+ @Override
+ public String toString() {
+ return "Product{" +
+ "id=" + id +
+ ", name='" + name + '\'' +
+ ", price=" + price +
+ ", stock=" + stock +
+ '}';
+ }
+}
diff --git a/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/OrderRest.java b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/OrderRest.java
new file mode 100644
index 00000000000..4ef7499266a
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/OrderRest.java
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store.rest;
+
+import org.eclipse.microprofile.jwt.JsonWebToken;
+import org.superbiz.store.entity.Order;
+import org.superbiz.store.service.OrderService;
+
+import javax.annotation.security.RolesAllowed;
+import javax.inject.Inject;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+@Path("store")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class OrderRest {
+
+ @Inject
+ private OrderService orderService;
+
+ @Inject
+ private JsonWebToken jwtPrincipal;
+
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String status() throws Exception {
+ return "running";
+ }
+
+ @GET
+ @Path("/userinfo")
+ @Produces(MediaType.TEXT_PLAIN)
+ public String userInfo() {
+ return "User: " + jwtPrincipal.getName() + " is in groups " + jwtPrincipal.getGroups();
+ }
+
+ @GET
+ @Path("/orders")
+ @RolesAllowed({"merchant", "buyer"})
+ public List getListOfOrders() {
+ return orderService.getOrders();
+ }
+
+ @GET
+ @Path("/orders/{id}")
+ @RolesAllowed({"merchant", "buyer"})
+ public Order getOrder(@PathParam("id") int id) {
+ return orderService.getOrder(id);
+ }
+
+ @POST
+ @Path("/orders")
+ @RolesAllowed({"merchant", "buyer"})
+ public Response addOrder(Order order) {
+ Order createdOrder = orderService.addOrder(order, jwtPrincipal.getName());
+
+ return Response
+ .status(Response.Status.CREATED)
+ .entity(createdOrder)
+ .build();
+ }
+
+ @DELETE
+ @Path("/orders/{id}")
+ @RolesAllowed({"merchant"})
+ public Response deleteOrder(@PathParam("id") int id) {
+ orderService.deleteOrder(id);
+
+ return Response
+ .status(Response.Status.NO_CONTENT)
+ .build();
+ }
+
+ @PUT
+ @Path("/orders")
+ @RolesAllowed({"merchant", "buyer"})
+ public Response updateOrder(Order order) {
+ Order updatedOrder = orderService.updateOrder(order, jwtPrincipal.getName());
+
+ return Response
+ .status(Response.Status.OK)
+ .entity(updatedOrder)
+ .build();
+ }
+}
diff --git a/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/RestApplication.java b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/RestApplication.java
new file mode 100644
index 00000000000..d9e761067c9
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/rest/RestApplication.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store.rest;
+
+import org.eclipse.microprofile.auth.LoginConfig;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+@ApplicationPath("/rest")
+@LoginConfig(authMethod = "MP-JWT")
+public class RestApplication extends Application {
+}
diff --git a/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/service/OrderService.java b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/service/OrderService.java
new file mode 100644
index 00000000000..dcf19bcf085
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/java/org/superbiz/store/service/OrderService.java
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store.service;
+
+import org.superbiz.store.entity.Order;
+import org.superbiz.store.entity.Product;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.ApplicationScoped;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@ApplicationScoped
+public class OrderService {
+
+ private Map ordersInStore;
+
+ @PostConstruct
+ public void ProductService() {
+ ordersInStore = new HashMap();
+ }
+
+ public List getOrders() {
+ return new ArrayList<>(ordersInStore.values());
+ }
+
+ public Order getOrder(int id) {
+ return ordersInStore.get(id);
+ }
+
+ public Order addOrder(Order order, String user) {
+ order.setOrderPrice(calculateOrderPrice(order));
+ order.setCreatedUser(user);
+
+ ordersInStore.put(order.getId(), order);
+
+ return order;
+ }
+
+ public void deleteOrder(int id) {
+ ordersInStore.remove(id);
+ }
+
+ public Order updateOrder(Order order, String user) {
+ order.setOrderPrice(calculateOrderPrice(order));
+ order.setUpdatedUser(user);
+
+ ordersInStore.put(order.getId(), order);
+
+ return order;
+ }
+
+ private BigDecimal calculateOrderPrice(Order order) {
+ return order.getProducts().stream()
+ .map(Product::getPrice)
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
+ }
+}
diff --git a/examples/mp-rest-jwt-principal/src/main/resources/META-INF/microprofile-config.properties b/examples/mp-rest-jwt-principal/src/main/resources/META-INF/microprofile-config.properties
new file mode 100644
index 00000000000..c1ca2e65d22
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/resources/META-INF/microprofile-config.properties
@@ -0,0 +1,2 @@
+mp.jwt.verify.publickey.location=/publicKey.pem
+mp.jwt.verify.issuer=https://example.com
\ No newline at end of file
diff --git a/examples/mp-rest-jwt-principal/src/main/resources/publicKey.pem b/examples/mp-rest-jwt-principal/src/main/resources/publicKey.pem
new file mode 100644
index 00000000000..39afa141390
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/main/resources/publicKey.pem
@@ -0,0 +1,8 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApaNAV+HrffoQiXv1F7uqxup406191W0t
+CBcJYzXaSCqA9Y64sRIeMLNO6L8iz1yz8VmWIwMRGjcGRQKH4ddInrHNtKdsdRUC/tbvR4wD/04V
+gFR5Lm00jz3rHb2w1znn6GmdEzE1QoFUdRRzA+M0WJ+A0E6f9g7zXfJuHIsRkZVBfhRBxmKgvryH
+t1sdlItOoZFwwEz+3PDNcMEfFRJ8EfOixhtSIyX1VSSal4ychycBdZNQLAjqrCLf0MMXqPQfuqYy
+z4/4CE09yLoKqsoMfIwe2RgrGTYdHfa7z9sMSI9x1CHSYY7tx/h63weYBHSAhWBqaU0WyvYrUtLl
++xmorQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/GenerateKeyUtils.java b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/GenerateKeyUtils.java
new file mode 100644
index 00000000000..e9d9f956a51
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/GenerateKeyUtils.java
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store;
+
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.util.Base64;
+
+public class GenerateKeyUtils {
+ public static void generateKeyPair(String keyAlgorithm, int keySize) throws NoSuchAlgorithmException {
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(keyAlgorithm); // RSA
+ kpg.initialize(keySize); // 2048
+ KeyPair kp = kpg.generateKeyPair();
+
+ System.out.println("-----BEGIN PRIVATE KEY-----");
+ System.out.println(Base64.getMimeEncoder().encodeToString(kp.getPrivate().getEncoded()));
+ System.out.println("-----END PRIVATE KEY-----");
+ System.out.println("-----BEGIN PUBLIC KEY-----");
+ System.out.println(Base64.getMimeEncoder().encodeToString(kp.getPublic().getEncoded()));
+ System.out.println("-----END PUBLIC KEY-----");
+ }
+}
diff --git a/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrderRestClient.java b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrderRestClient.java
new file mode 100644
index 00000000000..9f4795517ce
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrderRestClient.java
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.store;
+
+import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
+import org.superbiz.store.entity.Order;
+
+import javax.enterprise.context.Dependent;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+@Dependent
+@RegisterRestClient
+@Path("/test/rest/store/")
+@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})
+@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})
+public interface OrderRestClient {
+ @GET
+ String status();
+
+ @GET
+ @Path("/userinfo")
+ String getUserInfo(@HeaderParam("Authorization") String authHeaderValue);
+
+ @GET
+ @Path("/orders/{id}")
+ Response getOrder(@HeaderParam("Authorization") String authHeaderValue, @PathParam("id") int id);
+
+ @GET
+ @Path("/orders")
+ List getOrders(@HeaderParam("Authorization") String authHeaderValue);
+
+ @POST
+ @Path("/orders")
+ Response addOrder(@HeaderParam("Authorization") String authHeaderValue, Order newOrder);
+
+ @PUT
+ @Path("/orders")
+ Response updateOrder(@HeaderParam("Authorization") String authHeaderValue, Order updatedOrder);
+
+ @DELETE
+ @Path("/orders/{id}")
+ Response deleteOrder(@HeaderParam("Authorization") String authHeaderValue, @PathParam("id") int id);
+}
diff --git a/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrdersTest.java b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrdersTest.java
new file mode 100644
index 00000000000..5f47323573e
--- /dev/null
+++ b/examples/mp-rest-jwt-principal/src/test/java/org/superbiz/store/OrdersTest.java
@@ -0,0 +1,158 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *