class ServletSecurityAuthenticationService extends GroupAdapterAuthorizationSource implements AuthenticationService {

    @Override
    public User login(String username,
                      String password) {
        final HttpServletRequest request = getRequestForThread();

        try {
            request.login(username,
                          password);
            return getUser();
        } catch (final ServletException e) {
            throw new FailedAuthenticationException("Failed to authenticate user " + username,
                                                    e);
        }
    }

    public  ServletSecurityAuthenticationService();

}