List of usage examples for com.google.gwt.user.client.rpc XsrfTokenServiceAsync getNewXsrfToken
void getNewXsrfToken(AsyncCallback<XsrfToken> asyncCallback);
From source file:net.webpasswordsafe.client.WebPasswordSafe.java
License:Open Source License
private void initXsrfProtection(final LoginWindow loginWindow) { XsrfTokenServiceAsync xsrf = (XsrfTokenServiceAsync) GWT.create(XsrfTokenService.class); ((ServiceDefTarget) xsrf).setServiceEntryPoint(GWT.getModuleBaseURL() + "xsrf"); xsrf.getNewXsrfToken(new AsyncCallback<XsrfToken>() { @Override/*from ww w . j a va2 s . c o m*/ public void onSuccess(XsrfToken token) { ServiceHelper.setXsrfToken(token); getSystemSettings(loginWindow); } @Override public void onFailure(Throwable caught) { WebPasswordSafe.handleServerFailure(caught); } }); }