FilterChain filterChain) throws IOException, ServletException {
String header = request.getHeader("Authorization");
if (header != null && header.startsWith("Basic"))
{
String base64Value = header.substring(6);
Base64 base64 = new Base64();
String decoded = new String(base64.decode(base64Value.getBytes()));
String[] pair = decoded.split(":");
String username = pair[0];
String password = pair[1];
request = createSecurityContext(request, username, password);
filterChain.doFilter(request, response);