Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7842683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:22:43+00:00 2026-06-02T16:22:43+00:00

I have a non-gae, gwt application and it have a module that allows users

  • 0

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;

    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;

And Client side;

    @Override
    public void onSuccess(LinkedHashMap<String, String> result) {


        String editLink = result.get("editlink");

        Window.open(editLink,"newwindow","locationno");

    }

Thanks for your helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:22:44+00:00Added an answer on June 2, 2026 at 4:22 pm

    If I may suggest using OAuth instead of Client Login, which is outdated and less secure.
    The functionality is basically the same (for OAuth 2.0 there are more ways to handle the login).

    I know, trying to understand how to access the api via OAuth is very confusing, so I try to break it down a little:

    If you use OAuth 2.0 you may want to use a library like this one or you can try out my own (although I wrote it for Android, this could work with other Java Apps including Web Apps)

    This is what happens when a user logs in the first time with your app:

    1. > Your App sends an authorization request containing some information about your app – for example your app needs to be registered with google and therefore has a special application key
    2. < The Server sends you a url, open it in a new browser window and let the user login. There he will be asked to allow your app to access his account (or some parts of it) – when he confirms he will be prompted an Authorization Code which he needs to copy
    3. > The user gets back to your app, where you will ask him for the authorization code. After he gave it, your app connects again with the server and sends the code as some kind of authorization grant of the user.
    4. < The Server answers with a access token
    5. All you need to do is use this access token (also called a bearer token) in all your requests to the server hidden in the header message.

    I am sorry I can’t give you a more precise answer right now, since I never used GWT. All I can say is, try using OAuth2, it is actually very simple (after you learn what all this confusing things like authorization flow, bearer token etc are) and really comfortable for your user, once the he has done the first login.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a non-rails application that I want to use rails active-record migrations with.
On GAE, a non-gmail user can create a Google Account using their non-gmail email
I'm trying to enable my GWT application authenticate users with their Google accounts. What
I have an (non-virtualized) ItemsControl that binds its ItemsSource to a ObeservableCollection of ViewModel
We have a non-profit web site that got about 5 million hits in May.
I have a non-Activity class (let's call it NonActivity) that needs to post a
The problem is the following. There are multiple rows that have non-unique identifiers: id
We need to have non-developers create dozens of input forms with XAML. The best
I would like to detect strings that have non-whitespace characters in them. Right now
We have our application hosted on Google app engine for Java and we have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.