Skip to content

Commit

Permalink
Merge pull request quarkusio#17144 from sberyozkin/resteasy_4.5.12
Browse files Browse the repository at this point in the history
Update to RestEasy 4.5.12
  • Loading branch information
gsmet authored May 11, 2021
2 parents d3048b0 + a4b6f97 commit 34709da
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<bouncycastle.fips.version>1.0.2</bouncycastle.fips.version>
<bouncycastle.tls.fips.version>1.0.11</bouncycastle.tls.fips.version>
<jandex.version>2.2.3.Final</jandex.version>
<resteasy.version>4.5.9.Final</resteasy.version>
<resteasy.version>4.5.12.Final</resteasy.version>
<opentracing.version>0.31.0</opentracing.version>
<opentracing-jaxrs.version>0.4.1</opentracing-jaxrs.version>
<opentracing-web-servlet-filter.version>0.2.3</opentracing-web-servlet-filter.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static io.restassured.RestAssured.given;
import static io.restassured.RestAssured.when;
import static org.hamcrest.Matchers.equalTo;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
Expand Down Expand Up @@ -35,6 +36,20 @@ public static void setupUsers() {
.add("user", "user", "user");
}

@Test
public void shouldPermitPermitAllMethodWithPathParam() {
assertStatus("/unsecured/permitAllPathParam/1", 200, 200);
}

@Test
public void shouldReportErrorNoEndpointDetailsMethodWithWrongPathParam() {
when().get("/unsecured/permitAllPathParam/string")
.then()
.statusCode(404)
.body(equalTo(
"RESTEASY003870: Unable to extract parameter from http request: javax.ws.rs.PathParam(\"index\") value is 'string'"));
}

@Test
public void shouldDenyUnannotated() {
String path = "/unsecured/defaultSecurity";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import javax.annotation.security.PermitAll;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

/**
* @author Michal Szynkiewicz, [email protected]
Expand All @@ -23,6 +24,13 @@ public String permitAll() {
return "permitAll";
}

@Path("/permitAllPathParam/{index}")
@GET
@PermitAll
public String permitAllPathParam(@PathParam("index") int i) {
return "permitAll";
}

@Path("/denyAll")
@GET
@DenyAll
Expand Down

0 comments on commit 34709da

Please sign in to comment.