Package com.zaranux.os.server.core

Examples of com.zaranux.os.server.core.Identity


    String id = request.getParameter("identity");
    String identityAssertion = request.getParameter("identityAssertion");
    String accessAssertion = request.getParameter("accessAssertion");


    Identity requester = new Identity(id, identityAssertion, accessAssertion);

    //response.setContentType("application/download");

    try
    {

      if(!requester.authenticate())
      {
        response.sendError(response.SC_UNAUTHORIZED);
        logger.finest("SC_UNAUTHORIZED");
        return;
      }

      logger.finest("GET: ZaranuxServlet.kernel.execute ->  " +  path +" , " +   requester.getID());
      Response output;
      try
      {
        output = kernel.execute("read", path, "0,-1", request.getInputStream(), false , requester);
        //if(output.isStream())
View Full Code Here


    // TODO see if you can make it static and if that improves performance ..
    final Kernel kernel = new Kernel();


   
    Identity requester = new Identity(id, identityAssertion, accessAssertion);
    try
    {
     
      if(!requester.authenticate())
      {
        response.sendError(response.SC_UNAUTHORIZED);
        logger.finest("SC_UNAUTHORIZED");
        return;
      }
     
      logger.finest("ZaranuxServlet.kernel.execute -> " + systemcall + " , " +  path +" , " + parameterList + ","  +  isBase64 + "," +  requester.getID() + "," + requester.getIDAssertion());

      Response output = null;
      InputStream is = null;
      if("fileupload".equals(systemcall))
      {
View Full Code Here

    return success;
  }

  @Override
  protected boolean createuser(String id, String pass) throws SystemCallNotSupported {
    return new Identity().create(id, pass);
  }
View Full Code Here

  @Override
  // null if invalid credential
  protected String login(String id, String passthrows SystemCallNotSupported {
         
    Identity claimedIdentity = new Identity(id);
    return claimedIdentity.authenticate(pass);

  }
View Full Code Here

                    // TODO see if you can make it static and if that improves performance ..

                    Boolean isBase64 = true;
                    String data = (BASE64data == null) ? "" : BASE64data;
          
                    Identity requester = new Identity(id, identityAssertion, "");

                    logger.finest("Zaranuxlet.kernel.execute -> " + systemcall + " , " +  path +" , " + parameterList + ","  +  isBase64 + "," +  requester.getID());
                    Response output;
                  try
                  {
                    output = ( new Kernel()).execute(systemcall, path, parameterList, new ByteArrayInputStream(data.getBytes()), isBase64, requester);
                }catch(UnauthorizedAccessException e)
View Full Code Here

TOP

Related Classes of com.zaranux.os.server.core.Identity

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.