Package org.orgama.shared.auth.model

Examples of org.orgama.shared.auth.model.ICompleteAuthState


    authInitialization.setState(AuthInitializationState.registering);
   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
    ICompleteAuthState completeAuthState = bootstrapper.bootstrap();
   
    assertNotNull(completeAuthState);
    assertEquals(AuthState.authenticated, completeAuthState.getAuthState());
    assertEquals(AuthServiceName.facebook,
        completeAuthState.getAuthServiceName());
  }
View Full Code Here


    userService.registerNewUser(authInitialization);
   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
    ICompleteAuthState completeAuthState = bootstrapper.bootstrap();
   
    assertNotNull(completeAuthState);
    assertEquals(AuthState.authenticated, completeAuthState.getAuthState());
    assertEquals(AuthServiceName.facebook,
        completeAuthState.getAuthServiceName());
  }
View Full Code Here

    authInitialization.setState(AuthInitializationState.registering);
   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
    ICompleteAuthState completeAuthState = bootstrapper.bootstrap();
   
    assertNotNull(completeAuthState);
    assertEquals(AuthState.authenticated, completeAuthState.getAuthState());
    assertEquals(AuthServiceName.googleAccounts,
        completeAuthState.getAuthServiceName());
  }
View Full Code Here

    userService.registerNewUser(authInitialization);
   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
    ICompleteAuthState completeAuthState = bootstrapper.bootstrap();
   
    assertNotNull(completeAuthState);
    assertEquals(AuthState.authenticated, completeAuthState.getAuthState());
    assertEquals(AuthServiceName.googleAccounts,
        completeAuthState.getAuthServiceName());
  }
View Full Code Here

  public void tearDown() {
  }
 
  @Test
  public void testInitialBehavior() {
    ICompleteAuthState state = bootstrapper.bootstrap();
   
    assertNotNull(state);
    assertEquals(AuthState.nil, state.getAuthState());
    assertNull(state.getAuthServiceName());
   
  }
View Full Code Here

      authSession.setSessionId(sessionId);
      authSession.setUserId(1);
      Ofy.save().entity(authSession).now();
    }
   
    ICompleteAuthState state = bootstrapper.bootstrap();
   
    assertNotNull(state);
    assertEquals(AuthState.authenticated, state.getAuthState());
    assertNull(state.getAuthServiceName());
   
  }
View Full Code Here

      authSession.setSessionId(sessionId);
      authSession.setUserId(1);
      Ofy.save().entity(authSession).now();
    }
   
    ICompleteAuthState state = bootstrapper.bootstrap();
   
    assertNotNull(state);
    assertEquals(AuthState.nil, state.getAuthState());
    assertNull(state.getAuthServiceName());
  }
View Full Code Here

    }
   
    //Set the cookie handler to throw an error on get
    ((MockCookieHandler)cookieHandler).setThrowErrorOnGet(true);
   
    ICompleteAuthState state = bootstrapper.bootstrap();
   
    assertNotNull(state);
    assertEquals(AuthState.serverError, state.getAuthState());
    assertNull(state.getAuthServiceName());
  }
View Full Code Here

   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
   
    ICompleteAuthState authState = bootstrapper.bootstrap();
   
    assertEquals(AuthState.serverError,
        authState.getAuthState());
  }
View Full Code Here

    authInitialization.setState(AuthInitializationState.registering);
   
    httpSession.setAttribute(constants.getAuthInitializationKey(),
        authInitialization);
   
    ICompleteAuthState completeAuthState = bootstrapper.bootstrap();
   
    assertNotNull(completeAuthState);
    assertEquals(AuthState.externalAuthenticationFailed,
        completeAuthState.getAuthState());
    assertEquals(AuthServiceName.googleAccounts,
        completeAuthState.getAuthServiceName());
  }
View Full Code Here

TOP

Related Classes of org.orgama.shared.auth.model.ICompleteAuthState

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.