Package org.beangle.security.core

Examples of org.beangle.security.core.Authentication


    if (exception instanceof AuthenticationException) {
      logger.debug("Authentication exception occurred", exception);
      sendStartAuthentication(request, response, chain, (AuthenticationException) exception);
    } else if (exception instanceof AuthorizationException) {
      AuthorizationException ae = (AuthorizationException) exception;
      Authentication auth = SecurityContextHolder.getContext().getAuthentication();
      if (AuthenticationUtils.isValid(auth)) {
        logger.debug("{} access {} is denied", auth.getName(), ae.getResource());
        accessDeniedHandler.handle(request, response, (AuthorizationException) exception);
      } else {
        logger.debug("anonymous access {} is denied", ae.getResource());
        sendStartAuthentication(request, response, chain,
            new AuthenticationException(ae.getMessage()));
View Full Code Here


    int sessionNum = 100;
    int profileNum = 10;
    SessionRegistry registry = new MemSessionRegistry();
    for (int i = 0; i < sessionNum; i++) {
      String random = RandomStringUtils.randomAlphanumeric(21);
      Authentication authentication = new UsernamePasswordAuthentication(new MockPrincipal(
          random, String.valueOf(RandomUtils.nextInt(profileNum))), random);
      registry.register(random, authentication);
    }

//    ConcurrentSessionStrategy controller = new ConcurrentSessionStrategy();
View Full Code Here

TOP

Related Classes of org.beangle.security.core.Authentication

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.