You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/04/16 22:45:38 UTC
[34/38] tomee git commit: Not needed
Not needed
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/3c089d35
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/3c089d35
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/3c089d35
Branch: refs/heads/master
Commit: 3c089d35e72987a93cfa3853f754e90cdbf8d267
Parents: 0340cef
Author: Jean-Louis Monteiro <je...@gmail.com>
Authored: Wed Mar 7 11:30:44 2018 +0100
Committer: Jean-Louis Monteiro <je...@gmail.com>
Committed: Wed Mar 7 11:30:44 2018 +0100
----------------------------------------------------------------------
.../tests/jaxrs/mpjwt/HelloResource.java | 49 -------------
.../tests/jaxrs/mpjwt/MPJWTApplication.java | 28 -------
.../arquillian/tests/jaxrs/mpjwt/MPJWTTest.java | 77 --------------------
3 files changed, 154 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/3c089d35/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/HelloResource.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/HelloResource.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/HelloResource.java
deleted file mode 100644
index bc030f1..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/HelloResource.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.apache.openejb.arquillian.tests.jaxrs.mpjwt;
-
-import org.eclipse.microprofile.jwt.Claim;
-import org.eclipse.microprofile.jwt.ClaimValue;
-
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Lock;
-import javax.ejb.LockType;
-import javax.ejb.Stateless;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.SecurityContext;
-
-@Path("/hello")
-@Stateless
-@Lock(LockType.READ)
-public class HelloResource {
-
- @Inject
- @Claim("jti")
- private ClaimValue<String> jti;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- @RolesAllowed("helloRole")
- public String sayHello(@Context SecurityContext context) {
- return "hello " + context.getUserPrincipal().getName();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3c089d35/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTApplication.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTApplication.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTApplication.java
deleted file mode 100644
index 18bdee6..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTApplication.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.apache.openejb.arquillian.tests.jaxrs.mpjwt;
-
-import org.eclipse.microprofile.auth.LoginConfig;
-
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
-
-@ApplicationPath("/api")
-@LoginConfig(authMethod = "MP-JWT")
-public class MPJWTApplication extends Application {
- // discovered
-}
http://git-wip-us.apache.org/repos/asf/tomee/blob/3c089d35/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTTest.java
deleted file mode 100644
index d29b2fc..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/mpjwt/MPJWTTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.apache.openejb.arquillian.tests.jaxrs.mpjwt;
-
-import org.apache.openejb.arquillian.tests.jaxrs.staticresources.PreviousFilter;
-import org.apache.openejb.arquillian.tests.jaxrs.staticresources.SimpleServlet;
-import org.apache.openejb.arquillian.tests.jaxrs.staticresources.TheResource;
-import org.apache.ziplock.IO;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.IOException;
-import java.net.URL;
-
-import static org.junit.Assert.assertEquals;
-
-@RunWith(Arquillian.class)
-public class MPJWTTest {
- @Deployment(testable = false)
- public static Archive<?> war() {
- return ShrinkWrap.create(WebArchive.class, "mpjwt.war")
- .addClasses(TheResource.class, SimpleServlet.class, PreviousFilter.class, MPJWTApplication.class, HelloResource.class)
- .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
- .addAsWebResource(new StringAsset("static"), "index.html")
- .addAsWebResource(new StringAsset("JSP <%= 5 %>"), "sample.jsp");
- }
-
- @ArquillianResource
- private URL url;
-
- @Test
- public void jaxrs() throws IOException {
- assertEquals("resource", IO.slurp(new URL(url.toExternalForm() + "api/the")));
- }
-
- @Test
- public void staticResource() throws IOException {
- assertEquals("static", IO.slurp(url));
- }
-
- @Test
- public void servlet() throws IOException {
- assertEquals("Servlet!", IO.slurp(new URL(url + "servlet")));
- }
-
- @Test
- public void jsp() throws IOException {
- assertEquals("JSP 5", IO.slurp(new URL(url + "sample.jsp")).trim());
- }
-
- @Test
- public void filterOrder() throws IOException {
- assertEquals("I'm the first", IO.slurp(new URL(url.toExternalForm() + "api/gotFilter")));
- }
-}