@Override public String getDomainInternal() { Container c = getContainer(); if (c == null) { return null; } else { return c.getDomain(); } } }
@Override public String getDomainInternal() { return MBeanUtils.getDomain(getContainer()); } }
@Override public String getDomainInternal() { return MBeanUtils.getDomain(getContainer()); } }
@Override public String getDomainInternal() { Container c = getContainer(); if (c == null) { return null; } else { return c.getDomain(); } } }
@Override public String getDomainInternal() { return MBeanUtils.getDomain(getContainer()); } }
@Override public String getDomainInternal() { return MBeanUtils.getDomain(getContainer()); } }
@Override public String getDomainInternal() { return MBeanUtils.getDomain(getContainer()); } }
@Override public String getDomainInternal() { Container c = getContainer(); if (c == null) { return null; } else { return c.getDomain(); } } }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); containerLog = getContainer().getLogger(); }
StringBuilder name = new StringBuilder("type=Valve"); Container container = getContainer();
StringBuilder name = new StringBuilder("type=Valve"); Container container = getContainer();
public boolean authorize(Principal principal, List roles) { Realm realm = valve.getContainer().getRealm(); Iterator iter = roles.iterator(); while (iter.hasNext()) { String role = (String)iter.next(); // For Tomcat 7, we need to get the wrapper from the request to support role mapping in the web.xml. // This is only supported for servlet endpoints. For NIO endpoints, the wrapper will be null. Wrapper wrapper = null; if (request != null) { // in the servlet case get the wrapper wrapper = request.getWrapper(); } // for nio the wrapper will be null if (realm.hasRole(wrapper, principal, role)) return true; } return false; }
public Principal login(String username, String password, HttpServletRequest servletRequest) { Realm realm = valve.getContainer().getRealm(); if (realm == null) return null; Principal principal = realm.authenticate(username, password); if (principal == null) return null; if (servletRequestMatches(servletRequest)) { request.setAuthType(AUTH_TYPE); request.setUserPrincipal(principal); Session session = getSession(request, true); // Cache the authentication information in our session. if (session != null) { session.setAuthType(AUTH_TYPE); session.setPrincipal(principal); if (username != null) session.setNote(Constants.SESS_USERNAME_NOTE, username); else session.removeNote(Constants.SESS_USERNAME_NOTE); if (password != null) session.setNote(Constants.SESS_PASSWORD_NOTE, password); else session.removeNote(Constants.SESS_PASSWORD_NOTE); } } return principal; }