@Test public void willNotAuthenticateABlankUser() { doReturn("").when(request).getHeader("SM_USER"); final String authenticatedUser = authenticator.authenticateRequest(request); assertThat(authenticatedUser, is(nullValue())); }
@Override public String authenticateRequest(final HttpServletRequest request) { final String smUser = request.getHeader(SITE_MINDER_HEADER.getValue()); if (smUser == null || smUser.trim().isEmpty()) { return null; } else { return smUser; } }
SiteMinderServletRequestAuthenticator implements ServletRequestAuthenticator { @Override public String authenticateRequest(final HttpServletRequest request) { final String smUser = request.getHeader(SITE_MINDER_HEADER.getValue()); if (smUser == null || smUser.trim().isEmpty()) { return null; } else { return smUser; } } }
SiteMinderServletRequestAuthenticator implements ServletRequestAuthenticator { @Override public String authenticateRequest(final HttpServletRequest request) { final String smUser = request.getHeader(SITE_MINDER_HEADER.getValue()); if (smUser == null || smUser.trim().isEmpty()) { return null; } else { return smUser; } }  }
SiteMinderServletRequestAuthenticator implements ServletRequestAuthenticator { @Override public String authenticateRequest(final HttpServletRequest request) { final String smUser = request.getHeader(SITE_MINDER_HEADER.getValue()); if (smUser == null || smUser.trim().isEmpty()) { return null; } else { return smUser; } }  static boolean isEnabled(); @Override String authenticateRequest(final HttpServletRequest request); }
SiteMinderServletRequestAuthenticator implements ServletRequestAuthenticator { @Override public String authenticateRequest(final HttpServletRequest request) { final String smUser = request.getHeader(SITE_MINDER_HEADER.getValue()); if (smUser == null || smUser.trim().isEmpty()) { return null; } else { return smUser; } }  static boolean isEnabled(); @Override String authenticateRequest(final HttpServletRequest request); static final SystemProperty<String> SITE_MINDER_HEADER; }