Skip to content

Instantly share code, notes, and snippets.

@gscordeiro
Created October 15, 2011 18:32
Show Gist options
  • Save gscordeiro/1289940 to your computer and use it in GitHub Desktop.
Save gscordeiro/1289940 to your computer and use it in GitHub Desktop.
JBoss BASIC Authentication
<!-- no web.xml -->
<security-constraint>
<display-name>require valid user</display-name>
<web-resource-collection>
<web-resource-name>internal application</web-resource-name>
<!-- secure only admin pages-->
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>parceiro</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Rest Easy App</realm-name>
</login-config>
<!-- no jboss-web.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>java:/jaas/meu-application-police</security-domain>
</jboss-web>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment