}
AccessControlContext defaultAcc = ContextManager.registerSubjectShort(defaultSubject, null);
JettyIdentityService identityService = new JettyIdentityService(defaultAcc, defaultSubject, runAsSource);
GeronimoLoginService loginService = new GeronimoLoginService(configurationFactory, identityService);
authConfigProperties.put(POLICY_CONTEXT_ID_KEY, policyContextID);
AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
RegistrationListener listener = new RegistrationListener() {
public void notify(String layer, String appContext) {
}
};
AuthConfigProvider authConfigProvider = authConfigFactory.getConfigProvider(messageLayer, appContext, listener);
CallbackHandler callbackHandler = new JaspicCallbackHandler(loginService);
ServerAuthConfig serverAuthConfig = authConfigProvider.getServerAuthConfig(messageLayer, appContext, callbackHandler);
//TODO appContext is supposed to be server-name<space>context-root
Authenticator authenticator = new GeronimoJaspiAuthenticator(serverAuthConfig, authConfigProperties, callbackHandler, serviceSubject, allowLazyAuthentication, identityService);
//login service functionality is already inside the servletCallbackHandler