Google Client Login Handling AuthToken

alphakry

New Member
I have a non-gae, gwt application and it have a module that allows users to create documents online via google docs api. To do that, i first ask user to enter the name and type of the document, than create a new document via google docs api with the given parameters and onSucces part of that servlet returns edit link which is used in client side to open a new page to edit the created document.Problem that, eachtime i try to open that editLink user have to enter login informations. To solve this i try to use Google Client Login but i am totally lost i think.First i have username and password of user and can directly use them, after searching i tried some examples which usually returns a token like this and that. Now what should i do with token? How can it be used to complete login process or should totally find another way to do login? All those oauth1,oauth2 and etc. documentations confused me a little bit.here are my steps;Server side;\[code\] LinkedHashMap<String, String> hashMap = new LinkedHashMap<String, String>(); // Login DocumentList docList = new DocumentList("document"); docList.login(ServletUtil.googleDocsLoginInfo().get("username"), ServletUtil.googleDocsLoginInfo().get("password")); //Create document with a unique suffix String docName= parameterName+ "-Created-" + new Date(); docList.createNew(docName, dosyaTur); // Find the created document and store editLink DocumentListFeed feed = docList.getDocsListFeed("all"); for (final DocumentListEntry entry : feed.getEntries()) { if (entry.getTitle().getPlainText().equals(docName)) { hashMap.put("editlink", entry.getDocumentLink().getHref()); } } return hashMap;\[/code\]And Client side;\[code\] @Override public void onSuccess(LinkedHashMap<String, String> result) { String editLink = result.get("editlink"); Window.open(editLink,"newwindow","locationno"); }\[/code\]Thanks for your helps.
 
Top