Package org.orgama.shared.auth.except

Examples of org.orgama.shared.auth.except.AuthException


      emailAddress = user.getSanitizedEmailAddress();

      IAuthService authService = authSources.get(serviceName);

      if (authService == null) {
        throw new AuthException("The auth service that user: "
            + emailAddress + " used to "
            + "authenticate, " + serviceName + " "
            + "was not found in the list of auth sources");
      }
View Full Code Here


   
    IAuthService authService =
        authSourceProvider.getAuthServices().get(authResourceName);
   
    if (authService == null) {
      throw new AuthException("No auth service could be found matching: "
          + authResourceName);
    }
   
    HttpServletResponse response = responseProvider.get();
   
View Full Code Here

   */
  void registerUser(AuthUser user) {
   
    //Could probably replace this with some @NotNulls
    if (Strings.isNullOrEmpty(user.getServiceSpecificUserId())) {
      throw new AuthException("Cannot register user with null or empty " +
          "external user id");
    }
   
    if (Strings.isNullOrEmpty(user.getSanitizedEmailAddress())) {
      throw new AuthException("Cannot register user with null or empty " +
          "email address");
    }
   
    if (Strings.isNullOrEmpty(user.getAuthServiceName())) {
      throw new AuthException("Cannot register user with null or empty " +
          "auth resource name");
    }
   
    Ofy.save().entity(user).now();
  }
View Full Code Here

    rand.nextBytes(sessionBytes);
    try {
      return Base64.encode(sessionBytes);
    }
    catch (Exception ex) {
      throw new AuthException("Failed to create session string", ex);
    }
    }
View Full Code Here

        //happens on duplicate session id (not often)
      }
    }
   
    if (!success) {
      throw new AuthException("Failed to create auth session");
    }
   
    HttpSession session = sessionProvider.get();
    ICookieHandler cookieHandler = cookieHandlerProvider.get();
    session.setAttribute(serverSideConstants.getAuthSessionKey(), result);
View Full Code Here

        authInit.getAuthServiceName());
   
    authInitService.clear();
     
    if (service == null) {
      throw new AuthException("No authentication service was " +
          "registered with the resource name: " +
          authInit.getAuthServiceName());
    }
   
    String serviceSpecificSessionId = service.getServiceSpecificSessionId();
View Full Code Here

        authInit.getAuthServiceName());
   
    authInitService.clear();
     
    if (service == null) {
      throw new AuthException("No authentication service was " +
          "registered with the resource name: " +
          authInit.getAuthServiceName());
    }
   
    String serviceSpecificSessionId = service.getServiceSpecificSessionId();
View Full Code Here

TOP

Related Classes of org.orgama.shared.auth.except.AuthException

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.