Package org.orgama.server.auth.model

Examples of org.orgama.server.auth.model.AuthInitialization


        return result;
      }
     
      //Reaching this step means there was no existing auth session. 
      //In stead get the auth initialization
      AuthInitialization authInit =
          authInitService.get();
      result.setAuthServiceName(authInit.getAuthServiceName());
     
      switch (authInit.getState()) {
        case nil: { //Implies user has not started authenticating yet
          result.setAuthState(AuthState.nil);
          break;
        }
        case registering: {
View Full Code Here


   
    assertNotNull(result);
    assertEquals("/_ah/login?continue=http%3A%2F%2F127.0.0.1%3A8888",
        result.getRedirectUrl());
   
    AuthInitialization authInit = authInitService.get();
   
    assertNotNull(authInit);
   
    assertEquals(emailAddress1, authInit.getEmailAddress());
    assertEquals(AuthServiceName.googleAccounts,
        authInit.getAuthServiceName());
    assertEquals(AuthInitializationState.registering, authInit.getState());
   
  }
View Full Code Here

    }
  }
 
  @Test
  public void testInitiateRegistrationAddressWhenAlreadyLoggedIn() {
    AuthInitialization authInit = new AuthInitialization();
    authInit.setAuthServiceName(AuthServiceName.googleAccounts);
    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
    sessionService.create(user, authInit);
   
    try {
      InitiateRegistration action =
View Full Code Here

   
  }
 
  @Test
  public void testRegisteringUserThatIsAlreadyRegistered() {
    AuthInitialization authInit = new AuthInitialization();
    authInit.setAuthServiceName(AuthServiceName.googleAccounts);
    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
   
    try {
      InitiateRegistration action =
          new InitiateRegistration();
View Full Code Here

  public void testAuthSystemCleanup() {
   
    String sessionId = "asdfasdfasdfasdfa";
   
    {
      AuthInitialization ai = authInitializationProvider.get();
      AuthSession as = new AuthSession();

      as.setExpirationDate(new Date(new Date().getTime() + 1000000));
      as.setSessionId(sessionId);
      as.setUserId(1);
View Full Code Here

    }
  }
 
  @Test
  public void testValidateEmailAddressWhenAlreadyLoggedIn() {
    AuthInitialization authInit = new AuthInitialization();
    authInit.setAuthServiceName(AuthServiceName.googleAccounts);
    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
    sessionService.create(user, authInit);
   
    try {
      ValidateEmailAddress action =
View Full Code Here

   
  }
 
  @Test
  public void testValidateEmailAddressWithExistingUser() throws Exception {
    AuthInitialization authInit = new AuthInitialization();
    authInit.setAuthServiceName(AuthServiceName.googleAccounts);
    authInit.setEmailAddress(env.getEmailAddress());
    authInit.setServiceSpecificUserId(env.getEmailAddress());
    AuthUser user = userService.registerNewUser(authInit);
   
    ValidateEmailAddress action =
        new ValidateEmailAddress(env.getEmailAddress());
    ValidateEmailAddressResult result =
View Full Code Here

TOP

Related Classes of org.orgama.server.auth.model.AuthInitialization

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.