Package org.opensaml.ws.wssecurity

Examples of org.opensaml.ws.wssecurity.KeyIdentifier


*/
public class KeyIdentifierUnmarshaller extends EncodedStringUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (KeyIdentifier.VALUE_TYPE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            keyIdentifier.setValueType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here


*/
public class KeyIdentifierMarshaller extends EncodedStringMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (!DatatypeHelper.isEmpty(keyIdentifier.getValueType())) {
            domElement.setAttributeNS(null, KeyIdentifier.VALUE_TYPE_ATTRIB_NAME, keyIdentifier.getValueType());
        }
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

*/
public class KeyIdentifierUnmarshaller extends EncodedStringUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (KeyIdentifier.VALUE_TYPE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            keyIdentifier.setValueType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

*/
public class KeyIdentifierMarshaller extends EncodedStringMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (!DatatypeHelper.isEmpty(keyIdentifier.getValueType())) {
            domElement.setAttributeNS(null, KeyIdentifier.VALUE_TYPE_ATTRIB_NAME, keyIdentifier.getValueType());
        }
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

            throws TrustException {

        SecurityTokenReference securityTokenReference
                = (SecurityTokenReference)SAMLUtils.buildXMLObject(SecurityTokenReference.ELEMENT_NAME);

        KeyIdentifier keyIdentifier = (KeyIdentifier)SAMLUtils.buildXMLObject(KeyIdentifier.ELEMENT_NAME);

        // Encoding type set to http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0
        // #Base64Binary
        keyIdentifier.setEncodingType(KeyIdentifier.ENCODING_TYPE_BASE64_BINARY);
        keyIdentifier.setValueType(WSSecurityConstants.THUMB_PRINT_SHA1);
        keyIdentifier.setValue(getThumbprintSha1(certificate));

        securityTokenReference.getUnknownXMLObjects().add(keyIdentifier);

        KeyInfo keyInfo = SAMLUtils.createKeyInfo();
        keyInfo.getXMLObjects().add(securityTokenReference);
View Full Code Here

TOP

Related Classes of org.opensaml.ws.wssecurity.KeyIdentifier

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.