Class SignMessageEncrypter

java.lang.Object
se.swedenconnect.opensaml.sweid.saml2.signservice.SignMessageEncrypter

public class SignMessageEncrypter extends Object
Bean for encrypting SignMessage objects.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encrypt(SignMessage signMessage, String entityID)
    Given a sign message holding a cleartext Message element, the method encrypts the message using the default encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.
    void
    encrypt(SignMessage signMessage, String entityID, org.opensaml.xmlsec.EncryptionConfiguration configuration)
    Given a sign message holding a cleartext Message element, the method encrypts the message using the supplied encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SignMessageEncrypter

      public SignMessageEncrypter(SAMLObjectEncrypter encrypter) throws net.shibboleth.shared.component.ComponentInitializationException
      Constructor.
      Parameters:
      encrypter - the encrypter bean
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException - for init errors
  • Method Details

    • encrypt

      public void encrypt(SignMessage signMessage, String entityID) throws org.opensaml.xmlsec.encryption.support.EncryptionException
      Given a sign message holding a cleartext Message element, the method encrypts the message using the default encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.
      Parameters:
      signMessage - the sign message holding the message to encrypt
      entityID - the SAML entityID of the IdP that is the recipient of the message (and to whom we encrypt for)
      Throws:
      org.opensaml.xmlsec.encryption.support.EncryptionException - for errors during encryption
      See Also:
    • encrypt

      public void encrypt(SignMessage signMessage, String entityID, org.opensaml.xmlsec.EncryptionConfiguration configuration) throws org.opensaml.xmlsec.encryption.support.EncryptionException
      Given a sign message holding a cleartext Message element, the method encrypts the message using the supplied encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.
      Parameters:
      signMessage - the sign message holding the message to encrypt
      entityID - the SAML entityID of the IdP that is the recipient of the message (and to whom we encrypt for)
      configuration - the encryption configuration to use
      Throws:
      org.opensaml.xmlsec.encryption.support.EncryptionException - for errors during encryption