Skip to content

Instantly share code, notes, and snippets.

@mkuehle
Last active October 19, 2016 09:49
Show Gist options
  • Save mkuehle/995c52763d8197041d2e4fad1c90e7df to your computer and use it in GitHub Desktop.
Save mkuehle/995c52763d8197041d2e4fad1c90e7df to your computer and use it in GitHub Desktop.
Java EE WildFly Basic Authentication web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAuth</web-resource-name>
<description>application security constraints</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>mygroup</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>ApplicationRealm</realm-name>
</login-config>
</web-app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment