Package com.agiletec.plugins.jpcasclient.aps.system.services.auth

Examples of com.agiletec.plugins.jpcasclient.aps.system.services.auth.CasClientUtils


      return retStatus;     
    }
    try {
      String ticket = request.getParameter("ticket");
      if (null != ticket && ticket.length() > 0 ) {
        CasClientUtils casClientUtils = new CasClientUtils();
        PageURL pageUrl = this.getUrlManager().createURL(reqCtx);
        String serviceUrl = casClientUtils.getURLStringWithoutTicketParam(pageUrl, reqCtx);
        _log.info("CAS - service " + serviceUrl + ", ticket " + ticket);
        Assertion assertion;
        assertion = _ticketValidationUtil.validateTicket(serviceUrl, ticket);
        request.getSession().setAttribute(CasClientPluginSystemCostants.JPCASCLIENT_CONST_CAS_ASSERTION, assertion);
       
View Full Code Here


        boolean authorized = this.getAuthManager().isAuth(currentUser, currentPage);
        if (authorized) {
          retStatus = ControllerManager.CONTINUE;
        } else if (SystemConstants.GUEST_USER_NAME.equals(currentUser.getUsername())) {
          _log.info("CAS - user not authorized and guest");
          CasClientUtils casClientUtils = new CasClientUtils();
          String loginBaseUrl = this.getCasClientConfig().getCasLoginURL();
          StringBuilder loginUrl = new StringBuilder(loginBaseUrl);
          loginUrl.append("?service=");
          PageURL pageUrl = this.getUrlManager().createURL(reqCtx);
          String serviceUrl = casClientUtils.getURLStringWithoutTicketParam(pageUrl, reqCtx);
          loginUrl.append(serviceUrl);
          _log.info("CAS - Redirecting to " + loginUrl.toString());
          reqCtx.addExtraParam(RequestContext.EXTRAPAR_REDIRECT_URL, loginUrl.toString());
          retStatus = ControllerManager.REDIRECT;
        } else {
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcasclient.aps.system.services.auth.CasClientUtils

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.