Bump shiro to 1.7.1
[aaa.git] / aaa-shiro / impl / src / main / java / org / opendaylight / aaa / shiro / web / env / ShiroWebEnvironmentLoaderListener.java
index a17e13f5f853241f5b098343e9cfbafc3d0241c7..7d9b12d8381eb585740f4d2ab7cca77553dcecec 100644 (file)
@@ -8,9 +8,7 @@
 package org.opendaylight.aaa.shiro.web.env;
 
 import javax.servlet.ServletContext;
-import org.apache.shiro.util.LifecycleUtils;
 import org.apache.shiro.web.env.EnvironmentLoaderListener;
-import org.apache.shiro.web.env.MutableWebEnvironment;
 import org.apache.shiro.web.env.WebEnvironment;
 import org.opendaylight.aaa.api.AuthenticationService;
 import org.opendaylight.aaa.api.TokenStore;
@@ -54,15 +52,8 @@ public class ShiroWebEnvironmentLoaderListener extends EnvironmentLoaderListener
     }
 
     @Override
-    protected WebEnvironment createEnvironment(final ServletContext sc) {
-        MutableWebEnvironment environment = new AAAIniWebEnvironment(shiroConfiguration, dataBroker,
-                certificateManager, authenticationService, tokenAuthenticators, tokenStore, passwordHashService);
-
-        // in newer Shiro version, there is a determineWebEnvironment() which should be
-        // used instead of createEnvironment() but for 1.3.x we just copy/paste from parent and do:
-        environment.setServletContext(sc);
-        customizeEnvironment(environment);
-        LifecycleUtils.init(environment);
-        return environment;
+    protected WebEnvironment determineWebEnvironment(final ServletContext servletContext) {
+        return new AAAIniWebEnvironment(shiroConfiguration, dataBroker, certificateManager, authenticationService,
+            tokenAuthenticators, tokenStore, passwordHashService);
     }
 }