The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
org/apache/shiro/samples/guice/SampleShiroNativeSessionsServletModule.java | 40 |
org/apache/shiro/samples/guice/SampleShiroServletModule.java | 41 |
public SampleShiroServletModule(ServletContext servletContext) { super(servletContext); this.servletContext = servletContext; } @Override protected void configureShiroWeb() { bindConstant().annotatedWith(Names.named("shiro.loginUrl")).to("/login.jsp"); try { this.bindRealm().toConstructor(IniRealm.class.getConstructor(Ini.class)); } catch (NoSuchMethodException e) { addError("Could not locate proper constructor for IniRealm.", e); } this.addFilterChain("/login.jsp", AUTHC); this.addFilterChain("/logout", LOGOUT); this.addFilterChain("/account/**", AUTHC); this.addFilterChain("/remoting/**", AUTHC, config(ROLES, "b2bClient"), config(PERMS, "remote:invoke:lan,wan")); } @Provides @Singleton Ini loadShiroIni() throws MalformedURLException { URL iniUrl = servletContext.getResource("/WEB-INF/shiro.ini"); return Ini.fromResourcePath("url:" + iniUrl.toExternalForm()); } @Override protected void bindWebSecurityManager(AnnotatedBindingBuilder<? super WebSecurityManager> bind) |