List of usage examples for org.apache.shiro.web.servlet IniShiroFilter IniShiroFilter
public IniShiroFilter()
From source file:org.lunifera.runtime.web.gyrex.vaadin.VaadinApplication.java
License:Open Source License
/** * Creates a new instance of the shiro security filter. * * @return */ protected Filter getSecurityFilter() { return new IniShiroFilter(); }
From source file:org.lunifera.runtime.web.vaadin.osgi.webapp.VaadinApplication.java
License:Open Source License
/** * Registers servlets, filters and resources. * /*ww w . j a v a 2 s. c o m*/ * @throws AppException */ protected void registerWebArtifacts() throws AppException { Hashtable<String, String> properties = new Hashtable<String, String>(); properties.put(VaadinConstants.EXTERNAL_PID, getId()); properties.put(VaadinConstants.APPLICATION_NAME, getName()); properties.put(VaadinConstants.WIDGETSET, getWidgetSetName()); properties.put("widgetset", getWidgetSetName()); properties.put("productionMode", Boolean.toString(isProductionMode())); servlet = new VaadinOSGiServlet(this); servletAlias = String.format("/%s", getUIAlias()); defaultContext = new WebResourcesHttpContext(Activator.getBundleContext().getBundle()); filter = new IniShiroFilter(); try { try { httpService.registerFilter("/", filter, properties, defaultContext); } catch (Exception e) { LOGGER.error("{}", e); throw new AppException(e); } if (!ResourceRegistrationCounter.INSTANCE.hasRegistrations()) { httpService.registerResources(RESOURCE_BASE, RESOURCE_BASE, defaultContext); } ResourceRegistrationCounter.INSTANCE.increment(); httpService.registerServlet(servletAlias, servlet, properties, defaultContext); } catch (ServletException e) { LOGGER.error("{}", e); throw new AppException(e); } catch (NamespaceException e) { LOGGER.error("{}", e); throw new AppException(e); } }
From source file:org.lunifera.runtime.web.vaadin.standalone.webapp.VaadinWebApplicationRegister.java
License:Open Source License
private Filter getSecurityFilter() { if (filter == null) { filter = new IniShiroFilter(); } return filter; }