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

  • Home
  • SEARCH
  • 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 6000255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:40:02+00:00 2026-05-23T00:40:02+00:00

I am having a problem using the Gatekeeper feature of GWTP. Following the example

  • 0

I am having a problem using the Gatekeeper feature of GWTP.
Following the example gwtp-sample-tab I have created the client code. But now I am still wondering how to notify the client side if the user has successfully logged in? (I am using the Google UserService.)

Could anybody please provide me a litte example?

Thank you very much!

  • 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-05-23T00:40:03+00:00Added an answer on May 23, 2026 at 12:40 am

    Not sure if i correctly understand your question because GWTP gatekeppers exists just for security purposes(block admin pages from other users or something similar). Annotate presenters with @UseGatekeeper( LoggedInGatekeeper.class ) and gwtp will let it show only to registered users all others will be redirected to home/error page.

    Anyway, if your site using GAE Users API(userservice) then users will have to go to google’s sign-in page for authorization and then return back to your site. Your site’s page will be completely refreshed, so using this technique and jsp you can save user’s info straight into host jsp-page.

    Then in main presenter onReset() method get those data using Dictionary class or JSNI and do something like this:

    email = JSNIUtils.getEmail(); 
      // or
      // Dictionary info = Dictionary.getDictionary("info");
      // String email = info.get("email");
    loginUrl = JSNIUtils.getLogInUrl();
    logoutUrl = JSNIUtils.getLogOutUrl();
    
    if (email != null && logoutUrl != null) {
          // user logged in -> show his email & log out link
        getView().getUserNameAnchor().setText(email);
        getView().getLogInOutAnchor().setText("Log out");
        getView().getLogInOutAnchor().setHref(logoutUrl);
    } else if (loginUrl != null) {  
          // unknown user -> show welcome & log in link
        getView().getUserNameAnchor().setText("Hello Stranger");
        getView().getLogInOutAnchor().setText("Log in");
        getView().getLogInOutAnchor().setHref(loginUrl);
    } // something else 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem using the Unity Application Block, I have created a
I am having a problem using the repaint method in the following code.Please suggest
I'm trying to wrap div with specific html code but I'm having problem using
I am having a problem using the signedCMS.decode routine. See the code below. The
I'm having the following problem using the Visual Studio 2010 Team System Beta 1:
I'm having a problem using nested partials with dynamic form builder code (from the
I'm having a problem using the jquery hover events. I've created a reduction of
I having a problem on using Split Method() . I have a string like
I'm having a problem using custom components at runtime. I have this custom FlowLayoutPanel
I am having some problem using the clone function in jQuery. I have been

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.