Package org.exist.security

Examples of org.exist.security.SecurityManager.authenticate()


    }

    // authenticate the credentials
    final SecurityManager secman = pool.getSecurityManager();
    try {
      user = secman.authenticate(username, password);
    } catch (final AuthenticationException e) {
      // if authentication failed then send a challenge request again
      if (sendChallenge) {sendChallenge(request, response);}
      return null;
    }
View Full Code Here


            return null;
        }

        SecurityManager securityManager = brokerPool.getSecurityManager();
        try {
            subject = securityManager.authenticate(username, password);

        } catch (AuthenticationException e) {
            LOG.info(String.format("User %s could not be authenticated. %s", username, e.getMessage()));
        }
        return subject;
View Full Code Here

        final String username = usernameResult.getStringValue();
       
        final SecurityManager sm = broker.getBrokerPool().getSecurityManager();
        Subject user;
        try {
            user = sm.authenticate(username, password.getStringValue());
        } catch(final AuthenticationException e) {
            final XPathException exception = new XPathException(this, "Authentication failed", e);
            logger.error("Authentication failed for [" + username + "] because of [" + e.getMessage() + "].", exception);
            throw exception;
        }
View Full Code Here

      user = SecurityManager.GUEST_USER;
      password = SecurityManager.GUEST_USER;
    }
    final SecurityManager securityManager = pool.getSecurityManager();
    try {
        return securityManager.authenticate(user, password);
  } catch (final AuthenticationException e) {
    throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, e.getMessage(), e);
  }
  }
View Full Code Here

     
      //try and validate the user and password
      final SecurityManager security = context.getBroker().getBrokerPool().getSecurityManager();
      Subject user;
      try {
        user = security.authenticate(userName, passwd);
      } catch (final AuthenticationException e) {
        logger.warn("Could not validate user " + userName + " ["+ e.getMessage() + "]");
        return BooleanValue.FALSE;
      }
//      why it was empty if user wasn't found??? -shabanovd
View Full Code Here

        try {
            Subject user;
         
            try {
              final SecurityManager sm = BrokerPool.getInstance().getSecurityManager();
              user = sm.authenticate(userName, password);
            } catch (final AuthenticationException e) {
                logger.error("Unable to authenticate user: " + userName + " " + getLocation());
                return BooleanValue.FALSE;
            } catch (final EXistException e) {
                logger.error("Unable to authenticate user: " + userName + " " + getLocation(), e);
View Full Code Here

            return null;
        }
       
        final SecurityManager secman = pool.getSecurityManager();
        try {
            return secman.authenticate(xmldbURL.getUsername(), xmldbURL.getPassword());
    } catch (final AuthenticationException e) {
          return null// authentication is failed
    }
    }
   
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.