Examples of AuthenticationException


Examples of org.nasutekds.server.admin.client.AuthenticationException

    try {
      ctx = new InitialLdapContext(env, null);
    } catch (javax.naming.CommunicationException e) {
      throw new CommunicationException(e);
    } catch (javax.naming.AuthenticationException e) {
      throw new AuthenticationException(e);
    } catch (javax.naming.AuthenticationNotSupportedException e) {
      throw new AuthenticationNotSupportedException(e);
    } catch (NamingException e) {
      // Assume some kind of communication problem.
      throw new CommunicationException(e);
View Full Code Here

Examples of org.netbeans.lib.cvsclient.connection.AuthenticationException

            connection.connect();
        }
        catch ( IOException e )
        {
            String message = "Cannot connect. Reason: " + e.getMessage();
            throw new AuthenticationException( message, e, message );
        }

        File privateKey = getPrivateKey();

        try
        {
            boolean authenticated;
            if ( privateKey != null && privateKey.exists() )
            {
                authenticated = connection.authenticateWithPublicKey( userName, privateKey, getPassphrase() );
            }
            else
            {
                authenticated = connection.authenticateWithPassword( userName, password );
            }

            if ( !authenticated )
            {
                String message = "Authentication failed.";
                throw new AuthenticationException( message, message );
            }
        }
        catch ( IOException e )
        {
            closeConnection();
            String message = "Cannot authenticate. Reason: " + e.getMessage();
            throw new AuthenticationException( message, e, message );
        }

        try
        {
            session = connection.openSession();
View Full Code Here

Examples of org.nxplanner.security.AuthenticationException

    public void populateSubjectPrincipalFromDatabase(Subject subject, String userId)
            throws AuthenticationException {
        Person person = getPerson(userId);
        if (person == null) {
            throw new AuthenticationException("user " + userId + " not found");
        }
        subject.getPrincipals().add(new PersonPrincipal(person));

    }
View Full Code Here

Examples of org.onesocialweb.openfire.exception.AuthenticationException

    final PrintWriter out = response.getWriter();
   
    // 1- Bind this request to a XMPP JID
    final JID user = getAuthenticatedUser(request);
    if (user == null) {
      throw new AuthenticationException();
    }

    // 2- Process the file
    final UploadManager uploadManager = UploadManager.getInstance();
View Full Code Here

Examples of org.openbankdata.core.client.exception.AuthenticationException

    if (!pBankRequest.skipAuthentication()) {
      if (!isSessionActive()) {
        getCache().clear();
        setSessionActive(activateSession());
        if (!isSessionActive()) {
          throw new AuthenticationException("Not logged in");
        }
      }
    }

    if (getCache().exists(pBankRequest)) {
View Full Code Here

Examples of org.openbravo.authentication.AuthenticationException

      m_sAutologonUsername = ConfigParameters.retrieveFrom(s.getServletContext()).getOBProperty(
          "authentication.autologon.username");
      try {
        m_sUserId = AuthenticationData.getUserId(conn, m_sAutologonUsername);
      } catch (ServletException e) {
        throw new AuthenticationException("Cannot authenticate user: " + m_sAutologonUsername, e);
      }

    } else {
      throw new AuthenticationException("Connection provider required for Autologon authentication");
    }
  }
View Full Code Here

Examples of org.openengsb.core.usersync.exception.AuthenticationException

   
    private void preparePersistenceAccess() {

        if (authenticationContext.getAuthenticatedPrincipal() == null
            || !(authenticationContext.getAuthenticatedPrincipal() instanceof String)) {
            throw new AuthenticationException("A user with DB access must be logged in.");
        }

        currentContext = ContextHolder.get().getCurrentContextId();
        ContextHolder.get().setCurrentContextId("up-context");
    }
View Full Code Here

Examples of org.openengsb.domain.authentication.AuthenticationException

                    String user = (String) invocation.getArguments()[0];
                    Password credentials = (Password) invocation.getArguments()[1];
                    if ("user".equals(user) && credentials.getValue().equals("password")) {
                        return new Authentication(user, credentials.toString());
                    }
                    throw new AuthenticationException("username and password did not match");
                }
            });
        PrivateKeySource keySource = mock(PrivateKeySource.class);
        when(keySource.getPrivateKey()).thenReturn(privateKey);
        MessageCryptoFilterFactory cipherFactory = new MessageCryptoFilterFactory(keySource, "AES");
View Full Code Here

Examples of org.simplecart.exceptions.AuthenticationException

        //HibernateUtil.beginTransaction();
       
        // create DAO instance
        CustomerDAO dao = new CustomerDAO();
        if (dao == null){
            throw new AuthenticationException ("Error initializing dao");
        }

        // create example object for query
        Customer loginCustomer = new Customer();
        loginCustomer.setUsername(username);
       
        // find member object by example
        Collection matchingCustomers = dao.findByExample(loginCustomer);
        Iterator memberIter = matchingCustomers.iterator();
        if (memberIter.hasNext()) {
            loginCustomer = (Customer) memberIter.next();
        } else loginCustomer = null;

        if ((loginCustomer == null) || !password.equals(loginCustomer.getPassword())) {
            throw new AuthenticationException ("Error validating user");
        }

        // commit this transaction
        HibernateUtility.commitTransaction();
        HibernateUtility.closeSession();
View Full Code Here

Examples of org.sonatype.security.authentication.AuthenticationException

      this.authenticateUser(user, password, testLdapConnector, ldapServer);
      return user;

    }
    catch (LdapDAOException e) {
      throw new AuthenticationException("Server: " + ldapServer.getName() + ", could not be accessed: "
          + e.getMessage(), e);
    }
  }
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.