Package com.agiletec.aps.system.services.url

Examples of com.agiletec.aps.system.services.url.PageURL


    }
    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


          _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;
View Full Code Here

    _casClientUtils = new CasClientUtils();
  }
 
  public void test () {
    RequestContext reqCtx = this.getRequestContext();
    PageURL pageUrl = new PageURL(_urlManager, reqCtx);

    pageUrl.addParam("param1", "value1");
    pageUrl.addParam("param2", "value2");
    pageUrl.addParam("ticket", "ticket_value");
    pageUrl.addParam("param3", "value3");
   
    String url = pageUrl.getURL();
    assertTrue(url.contains("ticket"));
   
    String urlWithoutParam = _casClientUtils.getURLStringWithoutTicketParam(pageUrl, reqCtx);
    assertNotNull(urlWithoutParam);
    assertFalse(urlWithoutParam.contains("ticket"));
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.services.url.PageURL

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.