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 8352647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:01:11+00:00 2026-06-09T09:01:11+00:00

I have a GWT application using Activities and Places pattern to navigate throw different

  • 0

I have a GWT application using Activities and Places pattern to navigate throw different places in my application.
In the application there are places where only authorized user can view.

The authorization mechanism is as follow:

1- user enters username + password

2- check the server for such user with provided password.

3- add Token in Datastore containing SID, username and expire date ( I am using GAE bwt )

4- Send the token to the Client.

Now, Before I allow user to Go to Place I should check if he/she is authorized,by check if his/her token is valid i.e previously saved in the store by authorization operation. I ended up with some ActivityMapper like this one.

public class ApplicationActivityMapper implements ActivityMapper {

  private ActionDispatcherServiceAsync service;

  private SecurityTokenProvider provider;
  private HashMap<Class<? extends Place>, ActivityPlaceMeta> placesActivitiesMap;

  @Inject
  public ApplicationActivityMapper(ActionDispatcherServiceAsync service, SecurityTokenProvider provider, HashMap<Class<? extends Place>, ActivityPlaceMeta> placesActivitiesMap) {

    this.service = service;

    this.provider = provider;

    this.placesActivitiesMap = placesActivitiesMap;

    this.placesActivitiesMap.put(PlaceNotFoundPlace.class, new ActivityPlaceMeta() {
      @Override
      public Activity getActivity(Place place) {
        return new PlaceNotFoundActivity();
      }
    });
  }

  @Override
  public Activity getActivity(Place place) {

    if (place instanceof SecuredPlace) {
      Token token = provider.getToken();
      service.dispatch(new CheckAuthorizationAction(token), new GotResponse<CheckAuthorizationResponse>() {
        @Override
        public void gotResponse(CheckAuthorizationResponse result) {
          if (result.isAuthorized()) {
            //here comes tht problem .... !!! 
            //how to return the place ???
          }
        }
      });
    }

    ActivityPlaceMeta returnedActivity = placesActivitiesMap.get(place.getClass());

    if (returnedActivity == null) {
      return placesActivitiesMap.get(PlaceNotFoundPlace.class).getActivity(new PlaceNotFoundPlace());
    }
    return returnedActivity.getActivity(place);
  }
}

Any other ideas ?
Thank in advance.

  • 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-09T09:01:13+00:00Added an answer on June 9, 2026 at 9:01 am

    With GWT applications it is not about securing a part of you UI, it is more about securing your server side that provides the data that is necessary for a certain place.

    If some user goes to a place that require a login simply let the remote service fail to provide any data. Your presenter should then handle the failure and maybe redirect to the login place.

    Of course you may want to limit navigation in your client if the user is not logged in and you can do so e.g. in your activity mappers.

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

Sidebar

Related Questions

I have a GWT MVP application using Activities and Places. This is inspired by
I have an application built with GWT/Appengine/Jdo...and i am using Google User Service for
I have a running Java GWT application, that I can compile using Eclipse. Now
I have a GWT application that features two frames (com.google.gwt.user.client.ui.Frame). Via Frame.setUrl(...) I can
I have a grid in my GWT application there are columns and rows which
I have gwt-project that is comunication to database. Application design mvp pattern and view
I have a GWT application and wanna to test load and functionality using a
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
Background Story: I am developing a GWT application, using the standard MVP design pattern,
I have GWT application and I want to secure it using spring security. I

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.