Package com.discursive.cas.extend.client

Examples of com.discursive.cas.extend.client.ProxyTicketValidator$ProxyHandler


  //*********************************************************************
  // Utility methods

  private String getAuthenticatedNetid(String ticket)
    throws ParserConfigurationException, SAXException, IOException, JspTagException {
    ProxyTicketValidator pv = new ProxyTicketValidator();
    pv.setCasValidateUrl(casValidate);
    pv.setServiceTicket(ticket);
    pv.setService(service);
    pv.validate();
    if (!pv.isAuthenticationSuccesful())
      throw new JspTagException(
        "CAS authentication error: " + pv.getErrorCode());
    if (pv.getProxyList().size() != 0) {
      // ticket was proxied
      if (acceptedProxies.size() == 0)
        throw new JspTagException("this page does not accept proxied tickets");
      else if (!acceptedProxies.contains(pv.getProxyList().get(0)))
        throw new JspTagException(
          "unauthorized top-level proxy: '" + pv.getProxyList().get(0) + "'");
    }
    return pv.getUser();
  }
View Full Code Here


     * @throws CASAuthenticationException - on authentication failure
     */
    private CASReceipt getAuthenticatedUser(HttpServletRequest request)
        throws ServletException, CASAuthenticationException {
        log.trace("entering getAuthenticatedUser()");
        ProxyTicketValidator pv = null;
       
            pv = new ProxyTicketValidator();
            pv.setCasValidateUrl(casConfig.getCasValidate() );
            pv.setServiceTicket(request.getParameter("ticket"));
            pv.setService(getService(request));
            pv.setRenew(Boolean.valueOf(casConfig.isCasRenew()).booleanValue());
            if (casConfig.getCasProxyCallbackUrl() != null) {
                pv.setProxyCallbackUrl(casConfig.getCasProxyCallbackUrl());
            }
            if (log.isDebugEnabled()) {
                log.debug(
                    "about to validate ProxyTicketValidator: [" + pv + "]");
            }
View Full Code Here

     *             on authentication failure
     */
    private CASReceipt getAuthenticatedUser(HttpServletRequest request)
            throws ServletException, CASAuthenticationException {
        log.trace("entering getAuthenticatedUser()");
        ProxyTicketValidator pv = null;

        pv = new ProxyTicketValidator();
        pv.setCasValidateUrl(casValidate);
        pv.setServiceTicket(request.getParameter("ticket"));
        pv.setService(getService(request));
        pv.setRenew(Boolean.valueOf(casRenew).booleanValue());
        if (casProxyCallbackUrl != null) {
            pv.setProxyCallbackUrl(casProxyCallbackUrl);
        }
        if (log.isDebugEnabled()) {
            log.debug("about to validate ProxyTicketValidator: [" + pv + "]");
        }

View Full Code Here

  //*********************************************************************
  // Utility methods

  private String getAuthenticatedNetid(String ticket)
    throws ParserConfigurationException, SAXException, IOException, JspTagException {
    ProxyTicketValidator pv = new ProxyTicketValidator();
    pv.setCasValidateUrl(casValidate);
    pv.setServiceTicket(ticket);
    pv.setService(service);
    pv.validate();
    if (!pv.isAuthenticationSuccesful())
      throw new JspTagException(
        "CAS authentication error: " + pv.getErrorCode());
    if (pv.getProxyList().size() != 0) {
      // ticket was proxied
      if (acceptedProxies.size() == 0)
        throw new JspTagException("this page does not accept proxied tickets");
      else if (!acceptedProxies.contains(pv.getProxyList().get(0)))
        throw new JspTagException(
          "unauthorized top-level proxy: '" + pv.getProxyList().get(0) + "'");
    }
    return pv.getUser();
  }
View Full Code Here

     * @throws CASAuthenticationException - on authentication failure
     */
    private CASReceipt getAuthenticatedUser(HttpServletRequest request)
        throws ServletException, CASAuthenticationException {
        log.trace("entering getAuthenticatedUser()");
        ProxyTicketValidator pv = null;
       
            pv = new ProxyTicketValidator();
            pv.setCasValidateUrl(casConfig.getCasValidate() );
            pv.setServiceTicket(request.getParameter("ticket"));
            pv.setService(getService(request));
            pv.setRenew(Boolean.valueOf(casConfig.isCasRenew()).booleanValue());
            if (casConfig.getCasProxyCallbackUrl() != null) {
                pv.setProxyCallbackUrl(casConfig.getCasProxyCallbackUrl());
            }
            if (log.isDebugEnabled()) {
                log.debug(
                    "about to validate ProxyTicketValidator: [" + pv + "]");
            }
View Full Code Here

     *             on authentication failure
     */
    private CASReceipt getAuthenticatedUser(HttpServletRequest request)
            throws ServletException, CASAuthenticationException {
        log.trace("entering getAuthenticatedUser()");
        ProxyTicketValidator pv = null;

        pv = new ProxyTicketValidator();
        pv.setCasValidateUrl(casValidate);
        pv.setServiceTicket(request.getParameter("ticket"));
        pv.setService(getService(request));
        pv.setRenew(Boolean.valueOf(casRenew).booleanValue());
        if (casProxyCallbackUrl != null) {
            pv.setProxyCallbackUrl(casProxyCallbackUrl);
        }
        if (log.isDebugEnabled()) {
            log.debug("about to validate ProxyTicketValidator: [" + pv + "]");
        }

View Full Code Here

TOP

Related Classes of com.discursive.cas.extend.client.ProxyTicketValidator$ProxyHandler

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.