Package org.jboss.security.xacml.interfaces

Examples of org.jboss.security.xacml.interfaces.ResponseContext


       * **************************************************************** -->
       <!-- Test case 5-01: Should be Perm + Obl: Dr A is on dissented list  -->
       <!-- **************************************************************** -->
       */
      String file = "XacmlRequest-05-01.xml";
      ResponseContext response = getResponse(file);
      ResultType result = response.getResult();
      ObligationsType obligationsType = result.getObligations();
      assertTrue("1 obligation", obligationsType.getObligation().size() == 1);
      validateCase(response, XACMLConstants.DECISION_PERMIT);
   }
View Full Code Here


    * @return
    * @throws Exception
    */
   public static int getDecision(PolicyDecisionPoint pdp, String requestFileLoc) throws Exception
   {
      ResponseContext response = getResponse(pdp,requestFileLoc);
      if (response == null)
         throw new RuntimeException("Response is null");
      if (debug)
         response.marshall(System.out);
      return response.getDecision();
   }
View Full Code Here

    * @return
    * @throws Exception
    */
   public static int getDecision(PolicyDecisionPoint pdp, RequestContext request) throws Exception
   {
      ResponseContext response = pdp.evaluate(request);
      if (debug)
         response.marshall(System.out);
      TestCase.assertNotNull("Response is not null", response);
      return response.getDecision();
   }
View Full Code Here

      finally
      {
         lock.unlock();
      }

      ResponseContext response = RequestResponseContextFactory.createResponseContext();
      response.set(XACMLConstants.RESPONSE_CTX, resp);
      return response;
   }
View Full Code Here

        
         byte[] resp = baos.toByteArray();
         System.out.println("RESPONSE:"+new String(resp));
         ByteArrayInputStream bis = new ByteArrayInputStream(resp);
        
         ResponseContext newRC = RequestResponseContextFactory.createResponseContext();
         newRC.readResponse(bis);
         element = (Element) newRC.getDocumentElement();
      }
      return element;
   }
View Full Code Here

      if(req == null)
         throw new IllegalStateException("Request Context does not contain a request");
     
      ResponseCtx resp = pdp.evaluate(req);
     
      ResponseContext response = RequestResponseContextFactory.createResponseContext();
      response.set(XACMLConstants.RESPONSE_CTX, resp);
      return response;
   }
View Full Code Here

        
         PolicyDecisionPoint pdp = util.getPDP(policyRegistration, this.policyContextID);
         if(pdp == null)
            throw new IllegalStateException("PDP is null");
        
         ResponseContext response = pdp.evaluate(requestCtx);
         result = response.getDecision() == XACMLConstants.DECISION_PERMIT ?
               AuthorizationContext.PERMIT : AuthorizationContext.DENY;
      }
      catch(Exception e)
      {
         if(trace)
View Full Code Here

        
         RequestContext requestContext = new JBossRequestContext();
         requestContext.setRequest(requestType);
        
         //pdp evaluation is thread safe
         ResponseContext responseContext = pdp.evaluate(requestContext)
        
         ResponseType responseType = new ResponseType();
         ResultType resultType = responseContext.getResult();
         responseType.getResult().add(resultType);

         XACMLAuthzDecisionStatementType xacmlStatement =
            XACMLContextFactory.createXACMLAuthzDecisionStatementType(requestType, responseType);
        
View Full Code Here

        } catch (IOException e) {
            throw new ProcessingException(e);
        }

        // pdp evaluation is thread safe
        ResponseContext responseContext = pdp.evaluate(requestContext);

        ResponseType responseType = new ResponseType();
        ResultType resultType = responseContext.getResult();
        responseType.getResult().add(resultType);

        XACMLAuthzDecisionStatementType xacmlStatement = XACMLContextFactory.createXACMLAuthzDecisionStatementType(requestType,
                responseType);
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.interfaces.ResponseContext

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.