Examples of EncryptedElementType


Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

           
            Element encAssertion = XMLEncryptionUtil.encryptElementInDocument(responseDoc,
                            publicKey, sk, keyLength, assertionQName, true);
           
           
            EncryptedElementType eet = saml2Response.getEncryptedAssertion(DocumentUtil.getNodeAsStream(encAssertion));
            responseType.getAssertionOrEncryptedAssertion().set(0, eet);
         }
         catch (MalformedURLException e)
         {
            // TODO Auto-generated catch block
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

      try
      {
         SAML2Response saml2Response = new SAML2Response();
         PrivateKey privateKey = keyManager.getSigningKey();
        
         EncryptedElementType myEET = (EncryptedElementType) responseType.getAssertionOrEncryptedAssertion().get(0);
         Document eetDoc = saml2Response.convert(myEET);
        
         Element decryptedDocumentElement = XMLEncryptionUtil.decryptElementInDocument(eetDoc,privateKey);
        
         //Let us use the encrypted doc element to decrypt it
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

      try
      {
         SAML2Response saml2Response = new SAML2Response();
         PrivateKey privateKey = keyManager.getSigningKey();
        
         EncryptedElementType myEET = (EncryptedElementType) responseType.getAssertionOrEncryptedAssertion().get(0);
         Document eetDoc = saml2Response.convert(myEET);
        
         Element decryptedDocumentElement = XMLEncryptionUtil.decryptElementInDocument(eetDoc,privateKey);
        
         //Let us use the encrypted doc element to decrypt it
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

           
            Element encAssertion = XMLEncryptionUtil.encryptElementInDocument(responseDoc,
                            publicKey, sk, keyLength, assertionQName, true);
           
           
            EncryptedElementType eet = saml2Response.getEncryptedAssertion(DocumentUtil.getNodeAsStream(encAssertion));
            responseType.getAssertionOrEncryptedAssertion().set(0, eet);
         }
         catch (MalformedURLException e)
         {
            throw new ParsingException(e);
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

      try
      {
         SAML2Response saml2Response = new SAML2Response();
         PrivateKey privateKey = keyManager.getSigningKey();
        
         EncryptedElementType myEET = (EncryptedElementType) responseType.getAssertionOrEncryptedAssertion().get(0);
         Document eetDoc = saml2Response.convert(myEET);
        
         Element decryptedDocumentElement = XMLEncryptionUtil.decryptElementInDocument(eetDoc,privateKey);
        
         //Let us use the encrypted doc element to decrypt it
View Full Code Here

Examples of org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType

           
            Element encAssertion = XMLEncryptionUtil.encryptElementInDocument(responseDoc,
                            publicKey, sk, keyLength, assertionQName, true);
           
           
            EncryptedElementType eet = saml2Response.getEncryptedAssertion(DocumentUtil.getNodeAsStream(encAssertion));
            responseType.getAssertionOrEncryptedAssertion().set(0, eet);
         }
         catch (MalformedURLException e)
         {
            throw new ParsingException(e);
View Full Code Here

Examples of org.opensaml.saml2.core.EncryptedElementType

       
        if (! (encryptedData.getParent() instanceof EncryptedElementType) ) {
            return resolvedEncKeys;
        }
       
        EncryptedElementType encElementType = (EncryptedElementType) encryptedData.getParent();
       
        for (EncryptedKey encKey : encElementType.getEncryptedKeys()) {
            if (matchRecipient(encKey.getRecipient())) {
                resolvedEncKeys.add(encKey);
            }
        }
       
View Full Code Here

Examples of org.opensaml.saml2.core.EncryptedElementType

public class EncryptedElementTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
            throws UnmarshallingException {
        EncryptedElementType eet = (EncryptedElementType) parentSAMLObject;

        if (childSAMLObject instanceof EncryptedData) {
            eet.setEncryptedData((EncryptedData) childSAMLObject);
        } else if (childSAMLObject instanceof EncryptedKey) {
            eet.getEncryptedKeys().add((EncryptedKey) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.core.EncryptedElementType

     */
    private EncryptedElementType encrypt(XMLObject xmlObject, QName encElementName) throws EncryptionException {
       
        checkParams(encParams, kekParamsList);
      
        EncryptedElementType encElement =
            (EncryptedElementType) builderFactory.getBuilder(encElementName).buildObject(encElementName);
       
        // Marshall the containing element, we will need its Document context to pass
        // to the key encryption method
        checkAndMarshall(encElement);
        Document ownerDocument = encElement.getDOM().getOwnerDocument();
       
        String encryptionAlgorithmURI = encParams.getAlgorithm();
        Key encryptionKey = SecurityHelper.extractEncryptionKey(encParams.getEncryptionCredential());
        if (encryptionKey == null) {
            encryptionKey = generateEncryptionKey(encryptionAlgorithmURI);
View Full Code Here

Examples of org.opensaml.saml2.core.EncryptedElementType

     */
    private EncryptedElementType encrypt(XMLObject xmlObject, QName encElementName) throws EncryptionException {
       
        checkParams(encParams, kekParamsList);
      
        EncryptedElementType encElement =
            (EncryptedElementType) builderFactory.getBuilder(encElementName).buildObject(encElementName);
       
        // Marshall the containing element, we will need its Document context to pass
        // to the key encryption method
        checkAndMarshall(encElement);
        Document ownerDocument = encElement.getDOM().getOwnerDocument();
       
        String encryptionAlgorithmURI = encParams.getAlgorithm();
        Key encryptionKey = SecurityHelper.extractEncryptionKey(encParams.getEncryptionCredential());
        if (encryptionKey == null) {
            encryptionKey = generateEncryptionKey(encryptionAlgorithmURI);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.