@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws IOException, ServletException {
try{
String header = request.getHeader("Authorization");
if (header == null || !header.startsWith("Basic ")) {
chain.doFilter(request, response);
return;
}
String[] decodedHeader = extractAndDecodeHeader(header, request);
String clientId = decodedHeader[0];
Timestamp lastModified = (Timestamp) clientDetailsService.loadClientByClientId(clientId).getAdditionalInformation().get(ClientConstants.LAST_MODIFIED);
} catch(BadCredentialsException e) {
super.getAuthenticationEntryPoint().commence(request, response, e);
return;
} catch(ClientRegistrationException e) {
logger.debug(e.getMessage());
}
super.doFilterInternal(request, response, chain);
}