Package com.liferay.portal.servlet.filters.context.sso

Examples of com.liferay.portal.servlet.filters.context.sso.SSOSubject


    {
      toRelValue = toRelValue.substring(0, toRelValue.length() - 1);
    }
   
    String action = request.getParameter("action");
    SSOSubject authenticated = (SSOSubject)request.getAttribute(SSOSubject.SSOSUBJECT_KEY);
    if(authenticated == null && !action.equals("generateGig") && !action.equals("generateGeg"))
    {
      throw new ServletException("The request does not have an "+SSOSubject.SSOSUBJECT_KEY+" attribute, this is not allowed!!!");
    }
    boolean applyToBoth = Boolean.valueOf(request.getParameter("applyToBoth")).booleanValue();
View Full Code Here


      case GEDCOM_SEARCH_VIEW:
        LOG.finest("The gedapi view is: GEDCOM Search: "+indi);
        baseView = Gedcom2View.gedcomSearchView(gedcom, gedcomURL, searchCriteria, searchScope);
        break;
      case SUBMITTER_VIEW:
        SSOSubject authenticated = (SSOSubject)request.getAttribute(SSOSubject.SSOSUBJECT_KEY);
        if(authenticated == null)
        {
        throw new ServletException("The request does not have an "+SSOSubject.SSOSUBJECT_KEY+" attribute, this is not allowed!!!");
        }
        LOG.finest("The gedapi view is: submitter: "+indi);
View Full Code Here

    //       before you are allowed to upload GEDCOM files
    if(ServletFileUpload.isMultipartContent(request))
    {
      if("/upload".equals(gedcomFilePath))
      {
        SSOSubject authenticated = (SSOSubject)request.getAttribute(SSOSubject.SSOSUBJECT_KEY);
        if(authenticated == null)
        {
          throw new ServletException("The request does not have an "+SSOSubject.SSOSUBJECT_KEY+" attribute, this is not allowed!!!");
        }
        LOG.finest("Uploading GEDCOM file...");
        try
        {
          String filenames = parseRequest(request, authenticated);
          // DONE: return the listing to the browser of the directory that contains the
          // .ged file that the user just finished uploading
         
          // do a forward here
          //RequestDispatcher dispatch = request.getRequestDispatcher("/");
          //dispatch.forward(request, response);
          String tabIndex = request.getParameter("tabIndex");
          LOG.finest("The tabIndex from the request is: "+tabIndex);
          if(tabIndex == null)
          {
            tabIndex = "5";
            //throw new ServletException("The tabIndex request parameter is null, this is not allowed!!!");
            // TODO: return this error message to the end user in the browser as the json response
          }
          response.sendRedirect(response.encodeRedirectURL(request.getContextPath()+"/successfulUpload.html?tabIndex="+tabIndex+"&gcsPath=uploads"+URLEncoder.encode(File.separator+authenticated.getScreenName(), "UTF-8")+"&successfulUpload="+URLEncoder.encode(filenames, "UTF-8")));
        }
        catch(Exception ex)
        {
          ex.printStackTrace();
        }
View Full Code Here

          one(httpRequest).getParameter("toRelValue");
          will(returnValue(toRelValue));
          one(httpRequest).getParameter("action");
          will(returnValue(action));
          one(httpRequest).getAttribute(SSOSubject.SSOSUBJECT_KEY);
          will(returnValue(new SSOSubject("r0wKz8K8U7En3pvets6KCJ4wT8Q=  ~  10129  ~  test  ~  Test  ~  Test  ~  "+new Date().getTime()+"  ~  1800000")));
          one(httpRequest).getParameter("applyToBoth");
          will(returnValue(applyToBoth));
         
          if(jsonResponse == null)
          {
View Full Code Here

TOP

Related Classes of com.liferay.portal.servlet.filters.context.sso.SSOSubject

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.