Package org.orgama.shared.auth.action

Examples of org.orgama.shared.auth.action.SignOut


  public void tearDown() {
  }
 
  @Test
  public void testSignOutWhenNotSignedIn() throws Exception {
    SignOut action = new SignOut();
    action.setAuthServiceName(AuthServiceName.googleAccounts);
    action.setSignOutOfApp(true);
    action.setSignOutOfExternalService(false);
   
    SignOutResult result = (SignOutResult)dispatch.execute(null, action);
 
    assertNotNull(result);
    assertNotNull(result.getRedirectUrl());
    assertEquals("http://127.0.0.1:8888", result.getRedirectUrl());
   
    action = new SignOut();
    action.setAuthServiceName(AuthServiceName.googleAccounts);
    action.setSignOutOfApp(false);
    action.setSignOutOfExternalService(true);
   
    result = (SignOutResult)dispatch.execute(null, action);
 
    assertNotNull(result);
    assertNotNull(result.getRedirectUrl());
    assertEquals("/_ah/logout?continue=http%3A%2F%2F127.0.0.1%3A8888",
        result.getRedirectUrl());
   
    action = new SignOut();
    action.setAuthServiceName(AuthServiceName.googleAccounts);
    action.setSignOutOfApp(true);
    action.setSignOutOfExternalService(true);
   
    result = (SignOutResult)dispatch.execute(null, action);
 
    assertNotNull(result);
    assertNotNull(result.getRedirectUrl());
View Full Code Here


    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
    sessionService.create(user, authInit);
   
    SignOut action = new SignOut();
    action.setAuthServiceName(AuthServiceName.googleAccounts);
    action.setSignOutOfApp(true);
    action.setSignOutOfExternalService(false);
   
    SignOutResult result = (SignOutResult)dispatch.execute(null, action);
 
    assertNotNull(result);
    assertNotNull(result.getRedirectUrl());
View Full Code Here

    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
    sessionService.create(user, authInit);
   
    SignOut action = new SignOut();
    action.setAuthServiceName(AuthServiceName.googleAccounts);
    action.setSignOutOfApp(true);
    action.setSignOutOfExternalService(true);
   
    SignOutResult result = (SignOutResult)dispatch.execute(null, action);
 
    assertNotNull(result);
    assertNotNull(result.getRedirectUrl());
View Full Code Here

   * @param signout
   */
  private void dispatchSignOut(boolean signOutOfApp,
      boolean signOutOfExternalService) {
   
    final SignOut signOut = new SignOut();
   
    signOut.setSignOutOfApp(signOutOfApp);
    signOut.setSignOutOfExternalService(signOutOfExternalService);
   
    if (signOutOfExternalService && !(signOutOfApp)) {
      signOut.setAuthServiceName(authState.getAuthServiceName());
    }
   
    signOut.setDisptachListener(new IDispatchListener() {

      @Override
      public void onDispatch() {
        getView().setBusy(true);
      }
View Full Code Here

TOP

Related Classes of org.orgama.shared.auth.action.SignOut

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.