Examples of AuthenticationException


Examples of de.innovationgate.webgate.api.auth.AuthenticationException

    }

    public AuthenticationSession login(X509Certificate cert) throws AuthenticationException {
       
        if (_status == STATUS_AUTHDB_UNKNOWN) {
            throw new AuthenticationException("Authentication was unable to collect data for valid logins yet. Please ensure that source database '" + _dbkey + "' is enabled and can be connected.");
        }
       
        if (_status == STATUS_AUTHDB_PREPARED) {
            try {
                runAuthCollector().join();
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.exceptions.AuthenticationException

        throw new UnauthorizedException();
      }
    }
    else
    {
      throw new AuthenticationException("Could not find WPISuite cookie. Please Login to recieve one.");
    }
   
    return s; 
  }
View Full Code Here

Examples of es.ipsa.atril.sec.exceptions.AuthenticationException

    } else {
      try {
        connect();
        oUser = new User(getSession(), id);
        if (!oUser.getNickName().equals(uid) && !oUser.getPassword().equals(passw))
          throw new AuthenticationException("User Id. does not match UUID or Password");
        email = oUser.getEmail();
        if (!changepassw) {
          oUser.activate();
          oUser.save(getSession());
          DAO.log(User.class, "ACTIVATE USER", AtrilEvent.Level.INFO, email+";"+id+";"+uid);
View Full Code Here

Examples of io.dropwizard.auth.AuthenticationException

    @Test
    public void shouldLogWhenExceptionIsThrown() throws AuthenticationException {
        final DefaultExceptionLogger defaultExceptionLogger = spy(new DefaultExceptionLogger());
        HystrixPlugins.getInstance().registerCommandExecutionHook(new ExceptionLoggingCommandHook(defaultExceptionLogger));
        when(mockAuthenticator.authenticate(any(String.class))).thenThrow(new AuthenticationException("test"));
        doCallRealMethod().when(defaultExceptionLogger).log(any(Exception.class), any(HystrixCommand.class));

        try {
            tenacityAuthenticator.authenticate("foo");
        } catch (HystrixRuntimeException err) {
View Full Code Here

Examples of javax.naming.AuthenticationException

         LoginContext lc = new LoginContext(protocol, handler);
         lc.login();
      }
      catch(LoginException e)
      {
         AuthenticationException ex = new AuthenticationException("Failed to login using protocol="+protocol);
         ex.setRootCause(e);
         throw ex;
      }

      // Now return the context using the standard jnp naming context factory
      Context iniCtx = super.getInitialContext(env);
View Full Code Here

Examples of javax.naming.AuthenticationException

            username));
      }
      final Actor actor = ServiceProvider.IMPL.getCredentialService().authenticate(username,
            credentials.toString());
      if (actor == null) {
        throw new AuthenticationException(Actor.class.getName() + ':' + username);
      }
      final String[] roles = new String[actor.getRoles().size()];
      int i = -1;
      for (final Role role : actor.getRoles()) {
        roles[++i] = role.getRole();
View Full Code Here

Examples of javax.naming.AuthenticationException

        return initCause(new RollbackException(), cause);
    }


    public static AuthenticationException newAuthenticationException(String message, Throwable cause){
        return initCause(new AuthenticationException(message), cause);
    }
View Full Code Here

Examples of javax.naming.AuthenticationException

    public static AuthenticationException newAuthenticationException(String message, Throwable cause){
        return initCause(new AuthenticationException(message), cause);
    }

    public static AuthenticationException newAuthenticationException(Throwable cause){
        return initCause(new AuthenticationException(), cause);
    }
View Full Code Here

Examples of javax.naming.AuthenticationException

        AuthenticationResponse res = null;

        try {
            res = requestAuthorization(req);
        } catch (RemoteException e) {
            throw new AuthenticationException(e.getLocalizedMessage());
        }

        switch (res.getResponseCode()) {
            case ResponseCodes.AUTH_GRANTED:
                client = res.getIdentity();
                break;
            case ResponseCodes.AUTH_REDIRECT:
                client = res.getIdentity();
                server = res.getServer();
                break;
            case ResponseCodes.AUTH_DENIED:
                throw (AuthenticationException) new AuthenticationException("This principle is not authorized.").initCause(res.getDeniedCause());
        }
    }
View Full Code Here

Examples of javax.naming.AuthenticationException

                } else {
                    clientIdentity = securityService.login(realmName, user, pass);
                }
                ClientSecurity.setIdentity(clientIdentity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(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.