From 4b534c55010a422212d7ff1eb612bb05f96d43cd Mon Sep 17 00:00:00 2001 From: Les Hazlewood Date: Tue, 19 Nov 2013 16:18:25 -0800 Subject: [PATCH 1/4] Step 1 modifications --- src/main/webapp/WEB-INF/shiro.ini | 30 ++++++++++++++++++++++++++++++ src/main/webapp/WEB-INF/web.xml | 18 ++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/main/webapp/WEB-INF/shiro.ini diff --git a/src/main/webapp/WEB-INF/shiro.ini b/src/main/webapp/WEB-INF/shiro.ini new file mode 100644 index 0000000..097f1b1 --- /dev/null +++ b/src/main/webapp/WEB-INF/shiro.ini @@ -0,0 +1,30 @@ +# +# Copyright (c) 2013 Les Hazlewood and contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# INI configuration is very powerful and flexible, while still remaining succinct. +# Please http://shiro.apache.org/configuration.html and +# http://shiro.apache.org/web.html for more. + +[main] + +# Let's use some in-memory caching to reduce the number of runtime lookups against Stormpath. A real +# application might want to use a more robust caching solution (e.g. ehcache or a distributed cache). When using such +# caches, be aware of your cache TTL settings: too high a TTL and the cache won't reflect any potential +# changes in Stormpath fast enough. Too low and the cache could evict too often, reducing performance. +cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager +securityManager.cacheManager = $cacheManager + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index d97982c..9a0ddf3 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -19,6 +19,24 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> + + org.apache.shiro.web.env.EnvironmentLoaderListener + + + + ShiroFilter + org.apache.shiro.web.servlet.ShiroFilter + + + + ShiroFilter + /* + REQUEST + FORWARD + INCLUDE + ERROR + + index.jsp From 076da2e55fc6c05fd17f2c37c3665ea3b1279912 Mon Sep 17 00:00:00 2001 From: Les Hazlewood Date: Thu, 19 Dec 2013 14:35:48 -0800 Subject: [PATCH 2/4] updated lib versions --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cbc093a..4c52c0c 100644 --- a/pom.xml +++ b/pom.xml @@ -81,12 +81,12 @@ com.stormpath.shiro stormpath-shiro-core - 0.4.0 + 0.5.0 com.stormpath.sdk stormpath-sdk-httpclient - 0.8.1 + 0.9.1 runtime From 5b333f71fa4190a76fe1f27e24adebfe2bbbd9f6 Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Mon, 12 Sep 2016 10:05:38 -0400 Subject: [PATCH 3/4] Updating dependency versions --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 4c52c0c..1e7f8de 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ war - 1.2.2 + 1.3.2 @@ -34,7 +34,7 @@ org.eclipse.jetty jetty-maven-plugin - 9.1.0.v20131115 + 9.3.11.v20160721 / @@ -50,18 +50,18 @@ org.slf4j slf4j-api - 1.7.5 + 1.7.21 org.slf4j jcl-over-slf4j - 1.7.5 + 1.7.21 runtime ch.qos.logback logback-classic - 1.0.13 + 1.1.7 runtime @@ -81,12 +81,12 @@ com.stormpath.shiro stormpath-shiro-core - 0.5.0 + 0.7.0 com.stormpath.sdk stormpath-sdk-httpclient - 0.9.1 + 1.0.4 runtime From 9da9f78c23d4c40d83955fc5ac5d17f17136fdb1 Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Mon, 12 Sep 2016 11:59:20 -0400 Subject: [PATCH 4/4] Add link to the tutorial text in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b88443c..c028b67 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ apache-shiro-webapp-tutorial ============================ -A step-by-step tutorial showing how to secure a web app with Apache Shiro +A [step-by-step tutorial](http://shiro.apache.org/webapp-tutorial.html) showing how to secure a web app with Apache Shiro.