use of org.activityinfo.client.authentication.ClientSideAuthProvider in project activityinfo by bedatadriven.
the class ActivityInfoEntryPoint method onModuleLoad.
/**
* This is the entry point method.
*/
@Override
public void onModuleLoad() {
Log.info("Application: onModuleLoad starting");
Log.info("Application Permutation: " + GWT.getPermutationStrongName());
try {
new ClientSideAuthProvider().get();
} catch (Exception e) {
Log.error("Exception getting client side authentication", e);
SessionUtil.forceLogin();
}
if (Log.isErrorEnabled()) {
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
@Override
public void onUncaughtException(Throwable e) {
Log.error("Uncaught exception", e);
}
});
}
GXT.setDefaultTheme(Theme.BLUE, true);
// avoid cookie overflow
StateManager.get().setProvider(new SafeStateProvider());
Log.trace("Application: GXT theme set");
final AppInjector injector = GWT.create(AppInjector.class);
injector.createAppLoader();
injector.createDashboardLoader();
injector.createDataEntryLoader();
injector.createReportLoader();
injector.createConfigLoader();
injector.createSearchLoader();
injector.getUsageTracker();
injector.getHistoryManager();
injector.createOfflineController();
// hold off on this until it's possilbe to
// turn off
// injector.createPromptOfflineDialog();
createCaches(injector);
AppCacheMonitor.start();
Log.info("Application: everyone plugged, firing Init event");
injector.getEventBus().fireEvent(AppEvents.INIT);
}
use of org.activityinfo.client.authentication.ClientSideAuthProvider in project activityinfo by bedatadriven.
the class UserProfilePage method bindProfile.
private void bindProfile() {
userProfile = new UserProfileDTO();
AuthenticatedUser user = new ClientSideAuthProvider().get();
dispatcher.execute(new GetUserProfile(user.getUserId()), new AsyncCallback<UserProfileDTO>() {
@Override
public void onFailure(Throwable caught) {
Log.error("error binding profile", caught);
MessageBox.alert(I18N.CONSTANTS.serverError(), caught.getMessage(), null);
}
@Override
public void onSuccess(UserProfileDTO userProfileDTO) {
userProfile = userProfileDTO;
binding.bind(userProfile);
UserProfilePage.this.show();
}
});
}
Aggregations