Package com.jeecms.core.entity

Examples of com.jeecms.core.entity.Authentication


    String returnUrl = RequestUtils.getQueryParam(request, RETURN_URL);
    String message = RequestUtils.getQueryParam(request, MESSAGE);
    String authId = (String) session.getAttribute(request, AUTH_KEY);
    if (authId != null) {
      // 存在认证ID
      Authentication auth = authMng.retrieve(authId);
      // 存在认证信息,且未过期
      if (auth != null) {
        String view = getView(processUrl, returnUrl, auth.getId());
        if (view != null) {
          return view;
        } else {
          FrontUtils.frontData(request, model, site);
          model.addAttribute("auth", auth);
View Full Code Here


    WebErrors errors = validateSubmit(username, password, captcha,
        errorRemaining, request, response);
    if (!errors.hasErrors()) {
      try {
        String ip = RequestUtils.getIpAddr(request);
        Authentication auth = authMng.login(username, password, ip,
            request, response, session);
        // 是否需要在这里加上登录次数的更新?按正常的方式,应该在process里面处理的,不过这里处理也没大问题。
        cmsUserMng.updateLoginInfo(auth.getUid(), ip);
        CmsUser user = cmsUserMng.findById(auth.getUid());
        if (user.getDisabled()) {
          // 如果已经禁用,则推出登录。
          authMng.deleteById(auth.getId());
          session.logout(request, response);
          throw new DisabledException("user disabled");
        }
        removeCookieErrorRemaining(request, response);
        String view = getView(processUrl, returnUrl, auth.getId());
        if (view != null) {
          return view;
        } else {
          FrontUtils.frontData(request, model, site);
          return "redirect:login.jspx";
View Full Code Here

  public String process(HttpServletRequest request,
      HttpServletResponse response) {
    String returnUrl = RequestUtils.getQueryParam(request,
        LoginAct.RETURN_URL);
    String authId = RequestUtils.getQueryParam(request, AUTH_KEY);
    Authentication auth = authMng.retrieve(authId);
    if (auth != null) {
      authMng.storeAuthIdToSession(session, request, response, auth
          .getId());
    } else {
      log.warn("Authentication id not found: {}", authId);
    }
    return "redirect:" + returnUrl;
View Full Code Here

    String returnUrl = RequestUtils.getQueryParam(request, RETURN_URL);
    String message = RequestUtils.getQueryParam(request, MESSAGE);
    String authId = (String) session.getAttribute(request, AUTH_KEY);
    if (authId != null) {
      // 存在认证ID
      Authentication auth = authMng.retrieve(authId);
      // 存在认证信息,且未过期
      if (auth != null) {
        String view = getView(processUrl, returnUrl, auth.getId());
        if (view != null) {
          return view;
        } else {
          model.addAttribute("auth", auth);
          return "logon";
View Full Code Here

    WebErrors errors = validateSubmit(username, password, captcha,
        errorRemaining, request, response);
    if (!errors.hasErrors()) {
      try {
        String ip = RequestUtils.getIpAddr(request);
        Authentication auth = authMng.login(username, password, ip,
            request, response, session);
        // 是否需要在这里加上登录次数的更新?按正常的方式,应该在process里面处理的,不过这里处理也没大问题。
        cmsUserMng.updateLoginInfo(auth.getUid(), ip);
        CmsUser user = cmsUserMng.findById(auth.getUid());
        if (user.getDisabled()) {
          // 如果已经禁用,则退出登录。
          authMng.deleteById(auth.getId());
          session.logout(request, response);
          throw new DisabledException("user disabled");
        }
        removeCookieErrorRemaining(request, response);
        returnUrl="/jeeadmin/jeecms/index.do";
        System.out.println("我在com.jeecms.cms.action.admin.CmsLoginAct.submit加 returnUrl= /jeeadmin/jeecms/index.do");
        String view = getView(processUrl, returnUrl, auth.getId());
        cmsLogMng.loginSuccess(request, user, "login.log.loginSuccess");
        if (view != null) {
          return view;
        } else {
          return "redirect:login.jspx";
View Full Code Here

TOP

Related Classes of com.jeecms.core.entity.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.