Examples of AuthException


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

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

   
    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

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

   */
  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

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

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

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

        //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

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

        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

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

        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

Examples of org.sdnplatform.sync.error.AuthException

    protected void handshakeChallengeResponse(HelloMessage request,
                                              Channel channel)
                                                      throws AuthException {
        AuthChallengeResponse cr = request.getAuthChallengeResponse();
        if (cr == null) {
            throw new AuthException("No authentication data in " +
                    "handshake message");
        }
        if (cr.isSetResponse()) {
            authenticateResponse(currentChallenge, cr.getResponse());
            currentChallenge = null;
            channelState = ChannelState.AUTHENTICATED;
            handleHello(request, channel);
        } else if (cr.isSetChallenge()) {
            HelloMessage m = new HelloMessage();
            if (getLocalNodeId() != null)
                m.setNodeId(getLocalNodeId());
            AsyncMessageHeader header = new AsyncMessageHeader();
            header.setTransactionId(getTransactionId());
            m.setHeader(header);
            SyncMessage bsm = new SyncMessage(MessageType.HELLO);
            bsm.setHello(m);

            AuthChallengeResponse reply = new AuthChallengeResponse();
            reply.setResponse(generateResponse(cr.getChallenge()));
            m.setAuthChallengeResponse(reply);
            channel.write(bsm);
        } else {
            throw new AuthException("No authentication data in " +
                    "handshake message");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.