Package com.sun.xacml

Examples of com.sun.xacml.Indenter


*/
public class XACMLUtil {

    static public String asXMLString(RequestCtx ctx) {
        OutputStream out = new ByteArrayOutputStream();
        ctx.encode(out, new Indenter(2));
        return out.toString();
    }
View Full Code Here


        return out.toString();
    }

    static public String asXMLString(ResponseCtx ctx) {
        OutputStream out = new ByteArrayOutputStream();
        ctx.encode(out, new Indenter(2));
        return out.toString();
    }
View Full Code Here

            DigestMap.set(new HashMap<String, ResponseCtx>());
    }

    private ResponseCtx sendHttpPost(RequestCtx requestCtx) {
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        requestCtx.encode(bout, new Indenter(0), true);
        byte[] byteArray = bout.toByteArray();
        byte[] msgDigest = getDigestBytes(byteArray);

        if (msgDigest != null) {
            ResponseCtx responseCtx = DigestMap.get().get(new String(msgDigest));
View Full Code Here

    protected void log(RequestCtx ctx) {

        if (logger.isLoggable(Level.FINE) == false)
            return;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ctx.encode(out, new Indenter(2), true);
        logger.fine(out.toString());
        try {
            out.close();
        } catch (IOException e) {
            // do nothing
View Full Code Here

    protected void log(ResponseCtx ctx) {

        if (logger.isLoggable(Level.FINE) == false)
            return;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ctx.encode(out, new Indenter(2), true);
        logger.fine(out.toString());
        try {
            out.close();
        } catch (IOException e) {
            // do nothing
View Full Code Here

        Document doc = builder.parse(req.getInputStream());

        RequestCtx request = RequestCtx.getInstance(doc.getDocumentElement());
        ResponseCtx response = pdp.evaluate(request);

        response.encode(resp.getOutputStream(), new Indenter(0), true);
        return null;
    }
View Full Code Here

        List<RequestCtx> requestCtxs = createRequestCtxList();

        for (RequestCtx requestCtx : requestCtxs) {
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            requestCtx.encode(out, new Indenter(0), true);
            InputStream resp = post("security/geoxacml", out.toString());
            checkXACMLRepsonse(resp, "Permit");
        }
    }
View Full Code Here

      requestCtx = new RequestCtx(subjectSet,resourceSet,actionSet,environSet);
     
      if(trace)
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         requestCtx.encode(baos, new Indenter());
         log.trace("XACML Request:"+baos.toString());
         baos.close();
      }
      return requestCtx;
   }
View Full Code Here

      requestCtx = new RequestCtx(subjectSet,resourceSet,actionSet,environSet);
     
      if(trace)
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         requestCtx.encode(baos, new Indenter());
         log.trace("XACML Request:"+baos.toString());
         baos.close();
      }
      return requestCtx;
   }
View Full Code Here

      requestCtx = new RequestCtx(subjectSet,resourceSet,actionSet,environSet);
     
      if(trace)
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         requestCtx.encode(baos, new Indenter());
         log.trace("XACML Request:"+baos.toString());
         baos.close();
      }
      return requestCtx;
   }
View Full Code Here

TOP

Related Classes of com.sun.xacml.Indenter

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.