aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/WEB-INF
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/WEB-INF')
-rw-r--r--src/main/webapp/WEB-INF/shiro.ini18
-rw-r--r--src/main/webapp/WEB-INF/web.xml15
2 files changed, 33 insertions, 0 deletions
diff --git a/src/main/webapp/WEB-INF/shiro.ini b/src/main/webapp/WEB-INF/shiro.ini
new file mode 100644
index 0000000..21015af
--- /dev/null
+++ b/src/main/webapp/WEB-INF/shiro.ini
@@ -0,0 +1,18 @@
+[main]
+
+authc.loginUrl=/login.jspx
+roles.unauthorizedUrl = /access-denied.jsp
+
+sha256Matcher = org.apache.shiro.authc.credential.Sha256CredentialsMatcher
+
+myCredentialsMatcher = org.apache.shiro.authc.credential.AllowAllCredentialsMatcher
+
+myRealm = io.trygvis.esper.testing.web.MissingShiroJdbcRealm
+myRealm.authenticationQuery = select 'wat' from person where mail = ?
+myRealm.credentialsMatcher = $myCredentialsMatcher
+
+[urls]
+
+/external/** = anon
+
+/login.jspx = authc
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index de37fae..0a48260 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -2,6 +2,20 @@
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
+ <listener>
+ <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>ShiroFilter</filter-name>
+ <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ShiroFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
<filter>
<filter-name>Jersey</filter-name>
<!--
@@ -29,6 +43,7 @@
<filter-name>Jersey</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
+
<welcome-file-list>
<welcome-file>index.jspx</welcome-file>
</welcome-file-list>