Package org.opensaml.xacml.profile.saml

Examples of org.opensaml.xacml.profile.saml.XACMLAuthzDecisionQueryType


       
        //
        // Create SAML wrapper
        //
       
        XACMLAuthzDecisionQueryType authzQuery =
            SamlRequestComponentBuilder.createAuthzDecisionQuery(
                    "Issuer", request, SAMLProfileConstants.SAML20XACML20P_NS
            );
       
        Element policyElement = OpenSAMLUtil.toDom(authzQuery, doc);
View Full Code Here


       
        //
        // Create SAML wrapper
        //
       
        XACMLAuthzDecisionQueryType authzQuery =
            SamlRequestComponentBuilder.createAuthzDecisionQuery(
                    "Issuer", request, SAMLProfileConstants.SAML20XACML20P_NS
            );
       
        Element policyElement = OpenSAMLUtil.toDom(authzQuery, doc);
View Full Code Here

*/
public class XACMLAuthzDecisionQueryTypeUnmarshaller extends RequestAbstractTypeUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
        XACMLAuthzDecisionQueryType xacmlauthzdecisionquery = (XACMLAuthzDecisionQueryType) parentObject;

        if (childObject instanceof RequestType) {
            xacmlauthzdecisionquery.setRequest((RequestType) childObject);
        } else if (childObject instanceof PolicyType) {
            xacmlauthzdecisionquery.getPolicies().add((PolicyType) childObject);
        } else if (childObject instanceof PolicySetType) {
            xacmlauthzdecisionquery.getPolicySets().add((PolicySetType) childObject);
        } else if (childObject instanceof ReferencedPoliciesType) {
            xacmlauthzdecisionquery.setReferencedPolicies((ReferencedPoliciesType) childObject);
        } else {
            super.processChildElement(parentObject, childObject);
        }
    }
View Full Code Here

        }
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        XACMLAuthzDecisionQueryType authzDS = (XACMLAuthzDecisionQueryType) samlObject;

        if (attribute.getLocalName().equals(XACMLAuthzDecisionQueryType.INPUTCONTEXTONLY_ATTRIB_NAME)) {
            authzDS.setInputContextOnly(XSBooleanValue.valueOf(attribute.getValue()));
        }

        if (attribute.getLocalName().equals(XACMLAuthzDecisionQueryType.RETURNCONTEXT_ATTRIB_NAME)) {
            authzDS.setReturnContext(XSBooleanValue.valueOf(attribute.getValue()));
        }

        if (attribute.getLocalName().equals(XACMLAuthzDecisionQueryType.COMBINEPOLICIES_ATTRIB_NAME)) {
            authzDS.setCombinePolicies(XSBooleanValue.valueOf(attribute.getValue()));
        }

        super.processAttribute(samlObject, attribute);
    }
View Full Code Here

*/
public class XACMLAuthzDecisionQueryTypeMarshaller extends RequestAbstractTypeMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        XACMLAuthzDecisionQueryType query = (XACMLAuthzDecisionQueryType) samlObject;

        if (query.getInputContextOnlyXSBooleanValue() != null) {
            domElement.setAttributeNS(null, XACMLAuthzDecisionQueryType.INPUTCONTEXTONLY_ATTRIB_NAME, query
                    .getInputContextOnlyXSBooleanValue().toString());
        }

        if (query.getReturnContextXSBooleanValue() != null) {
            domElement.setAttributeNS(null, XACMLAuthzDecisionQueryType.RETURNCONTEXT_ATTRIB_NAME, query
                    .getReturnContextXSBooleanValue().toString());
        }

        if (query.getCombinePoliciesXSBooleanValue() != null) {
            domElement.setAttributeNS(null, XACMLAuthzDecisionQueryType.COMBINEPOLICIES_ATTRIB_NAME, query
                    .getCombinePoliciesXSBooleanValue().toString());
        }

        super.marshallAttributes(samlObject, domElement);
    }
View Full Code Here

    ) {
        if (xacmlAuthzDecisionQueryTypeBuilder == null) {
            xacmlAuthzDecisionQueryTypeBuilder = (XACMLObjectBuilder<XACMLAuthzDecisionQueryType>)
                builderFactory.getBuilder(XACMLAuthzDecisionQueryType.DEFAULT_ELEMENT_NAME_XACML20);
        }
        XACMLAuthzDecisionQueryType authzQuery =
            xacmlAuthzDecisionQueryTypeBuilder.buildObject(
                namespace,
                XACMLAuthzDecisionQueryType.DEFAULT_ELEMENT_LOCAL_NAME,
                SAMLProfileConstants.SAML20XACMLPROTOCOL_PREFIX
            );
        authzQuery.setID("_" + UUID.randomUUID().toString());
        authzQuery.setVersion(SAMLVersion.VERSION_20);
        authzQuery.setIssueInstant(new DateTime());
        authzQuery.setInputContextOnly(Boolean.valueOf(inputContextOnly));
        authzQuery.setReturnContext(Boolean.valueOf(returnContext));
       
        if (issuerValue != null) {
            Issuer issuer = createIssuer(issuerValue);
            authzQuery.setIssuer(issuer);
        }
       
        authzQuery.setRequest(request);
       
        return authzQuery;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.profile.saml.XACMLAuthzDecisionQueryType

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.