Package org.opensaml.xacml.ctx

Examples of org.opensaml.xacml.ctx.ResultType


            decisionType.setDecision(DecisionType.DECISION.Permit);
        } else {
            decisionType.setDecision(DecisionType.DECISION.Deny);
        }
       
        ResultType result = resultTypeBuilder.buildObject();
        result.setDecision(decisionType);
       
        StatusType status = statusTypeBuilder.buildObject();
        StatusCodeType statusCode = statusCodeTypeBuilder.buildObject();
        statusCode.setValue("urn:oasis:names:tc:xacml:1.0:status:ok");
        status.setStatusCode(statusCode);
        result.setStatus(status);
       
        ResponseType response = responseTypeBuilder.buildObject();
        response.setResult(result);
       
        return response;
View Full Code Here


            decisionType.setDecision(DecisionType.DECISION.Permit);
        } else {
            decisionType.setDecision(DecisionType.DECISION.Deny);
        }
       
        ResultType result = resultTypeBuilder.buildObject();
        result.setDecision(decisionType);
       
        StatusType status = statusTypeBuilder.buildObject();
        StatusCodeType statusCode = statusCodeTypeBuilder.buildObject();
        statusCode.setValue("urn:oasis:names:tc:xacml:1.0:status:ok");
        status.setStatusCode(statusCode);
        result.setStatus(status);
       
        ResponseType response = responseTypeBuilder.buildObject();
        response.setResult(result);
       
        return responseType2Source(response);
View Full Code Here

    ) throws Exception {
        RequestType request = requestBuilder.createRequest(principal, roles, message);
       
        ResponseType response = performRequest(request, message);
       
        ResultType result = response.getResult();
       
        // Handle any Obligations returned by the PDP
        handleObligations(request, principal, message, result);
       
        String resource = requestBuilder.getResource(message);
        if (result != null
            && (result.getResourceId() == null || resource.equals(result.getResourceId()))
            && (result.getDecision().getDecision() == DecisionType.DECISION.Permit)) {
            LOG.fine("XACML authorization permitted");
            return true;
        }
        LOG.fine("XACML authorization not permitted:");
        if (result != null && result.getStatus() != null) {
            if (result.getStatus().getStatusCode() != null) {
                LOG.fine("XACML Status Code: " + result.getStatus().getStatusCode().getValue());
            }
            if (result.getStatus().getStatusMessage() != null) {
                LOG.fine("XACML Status Message: " + result.getStatus().getStatusMessage().getValue());
            }
        }
       
        return false;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.ctx.ResultType

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.