Skip to content

Commit ff745e5

Browse files
committedNov 24, 2019
Making implicit assumption BASIC is used explicit
1 parent 391cc5c commit ff745e5

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
4+
version="3.1">
5+
6+
<login-config>
7+
<auth-method>BASIC</auth-method>
8+
<realm-name>file</realm-name>
9+
</login-config>
10+
11+
</web-app>

‎servlet/security-annotated/src/test/java/org/javaee7/servlet/security/annotated/SecureServletTest.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import static org.junit.Assert.assertNotNull;
88
import static org.junit.Assert.fail;
99

10+
import java.io.File;
1011
import java.net.URL;
1112

1213
import org.jboss.arquillian.container.test.api.Deployment;
@@ -29,6 +30,8 @@
2930
*/
3031
@RunWith(Arquillian.class)
3132
public class SecureServletTest {
33+
34+
private static final String WEBAPP_SRC = "src/main/webapp";
3235

3336
@ArquillianResource
3437
private URL base;
@@ -43,7 +46,8 @@ public static WebArchive createDeployment() {
4346
addUsersToContainerIdentityStore();
4447

4548
return create(WebArchive.class)
46-
.addClass(SecureServlet.class);
49+
.addClass(SecureServlet.class)
50+
.addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")));
4751
}
4852

4953
@Before

0 commit comments

Comments
 (0)
Failed to load comments.