}
IdentityService identityService = new GeronimoIdentityService(defaultSubject);
UserIdentity unauthenticatedIdentity = identityService.newUserIdentity(defaultSubject, null, null);
LoginService loginService = new GeronimoLoginService(configurationFactory, identityService);
Authenticator authenticator;
AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
RegistrationListener listener = new RegistrationListener() {
public void notify(String layer, String appContext) {
}
};
//?? TODO is context.getPath() the context root?
String appContext = "server " + geronimoContext.getPath();
AuthConfigProvider authConfigProvider = authConfigFactory.getConfigProvider(MESSAGE_LAYER, appContext, listener);
ServerAuthConfig serverAuthConfig = null;
JaspicCallbackHandler callbackHandler = null;
if (authConfigProvider != null) {
callbackHandler = new JaspicCallbackHandler(loginService);
try {