// Perform user authentication
LDAPRealmAuthenticationPolicy authenticationPolicy = authenticationPolicies.get(0);
if( authenticationPolicy != null) {
subject = HttpSecurityUtil.getSubject(msg);
CallbackHandler callbackHandler = new LDAPRealmAuthenticationCallbackHandler(subject);
/* Uses Geronimo to login */
LoginContext geronimoLoginContext = ContextManager.login(authenticationPolicy.getRealmConfigurationName(), callbackHandler);
authenticatedSubject = geronimoLoginContext.getSubject();