* @param config
* @throws ServletException
*/
@Override
protected void afterInit(ServletConfig config) throws ServletException {
ServletContainerFactory.getServletContainer().addAuthenticationListener(new AuthenticationListener() {
@Override
public void onEvent(AuthenticationEvent event) {
if (event.getType() == AuthenticationEventType.LOGIN) {
bindCredentialsToAuthenticationRegistry(getContainer(), event.getRequest(), event.getCredentials());
}