Package org.springframework.security.core

Examples of org.springframework.security.core.AuthenticationException


      HttpServletResponse response) {
    String path = request.getPathInfo();
    ModelAndView model = new ModelAndView(path);
    HttpSession session = request.getSession(false);
    response.setStatus(HttpServletResponse.SC_OK);
    final AuthenticationException ae = (session != null) ? (AuthenticationException) session
        .getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) : null;
    String errmsg = "";
    if (ae != null) {
      errmsg = ae.getMessage();
    } else {
      AccessDeniedException accessDenied = (AccessDeniedException) request
          .getAttribute(WebAttributes.ACCESS_DENIED_403);
      if (accessDenied != null) {
        errmsg = CapAppContext.getMessage("AccessCheck.AccessDenied",
View Full Code Here


        if (loginError) {
            HttpSession session = request.getSession(false);

            if(session != null) {
                AuthenticationException ex = (AuthenticationException) session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
                errorMsg = ex != null ? ex.getMessage() : "none";
            }
        }

        StringBuilder sb = new StringBuilder();
View Full Code Here

                authUser = ruleReaderService.authorize(
                        inTok.getPrincipal().toString(),
                        inTok.getCredentials().toString());
            } catch (Exception e) {
                LOGGER.log(Level.SEVERE, "Error in authenticating with GeoFence", e);
                throw new AuthenticationException("Error in GeoFence communication", e) {};
            }

            if(authUser != null) {
                LOGGER.log(Level.FINE, "User {0} authenticated: {1}", new Object[]{inTok.getPrincipal(), authUser});
View Full Code Here

@Controller("loginControllerExample")
@RequestMapping("/login/")
public class LoginController {
    @RequestMapping( { "/index", "/" })
    public String index(@ModelAttribute LoginForm loginForm, BindingResult result, HttpServletRequest request) {
        AuthenticationException ae = (AuthenticationException) request.getSession().getAttribute(
                AUTHENTICATION_EXCEPTION);
        if (ae != null) {
            result.reject("login.unsuccessful");
        }
        return "/login/index";
View Full Code Here

TOP

Related Classes of org.springframework.security.core.AuthenticationException

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.