authenticationAttributes.put(AuthenticationManagerFactory.ATTRIBUTE_TYPE,
PlainPasswordFileAuthenticationManagerFactory.PROVIDER_TYPE);
authenticationAttributes.put(AuthenticationProvider.NAME, "test-authenticator");
authenticationAttributes.put(PlainPasswordFileAuthenticationManagerFactory.ATTRIBUTE_PATH,
authenticationProviderFile.getAbsolutePath());
UUID authenticationId = UUID.randomUUID();
final PreferencesProviderRecoverer preferencesRecoverer = new PreferencesProviderRecoverer();
RecovererProvider recovererProvider = new RecovererProvider()
{
@Override
public ConfiguredObjectRecoverer<? extends ConfiguredObject> getRecoverer(String type)
{
return preferencesRecoverer;
}
};
Map<String, Object> preferencesAttributes = new HashMap<String, Object>();
UUID preferencesId = UUID.randomUUID();
preferencesAttributes.put(PreferencesProvider.TYPE, FileSystemPreferencesProvider.PROVIDER_TYPE);
preferencesAttributes.put(PreferencesProvider.NAME, "test-provider");
File file = TestFileUtils.createTempFile(this, ".prefs.json",
"{\"test_user\":{\"pref1\": \"pref1Value\", \"pref2\": 1.0} }");
preferencesAttributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());