Class SignMessageEncrypter
- java.lang.Object
-
- se.litsec.swedisheid.opensaml.saml2.signservice.SignMessageEncrypter
-
public class SignMessageEncrypter extends Object
Bean for encryptingSignMessageobjects.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Constructor Summary
Constructors Constructor Description SignMessageEncrypter(SAMLObjectEncrypter encrypter)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencrypt(SignMessage signMessage, String entityID)Given a sign message holding a cleartextMessageelement, the method encrypts the message using the default encryption configuration and updates the suppliedsignMessageso that it holds anEncryptedMessageinstead.voidencrypt(SignMessage signMessage, String entityID, EncryptionConfiguration configuration)Given a sign message holding a cleartextMessageelement, the method encrypts the message using the supplied encryption configuration and updates the suppliedsignMessageso that it holds anEncryptedMessageinstead.
-
-
-
Constructor Detail
-
SignMessageEncrypter
public SignMessageEncrypter(SAMLObjectEncrypter encrypter) throws ComponentInitializationException
Constructor.- Parameters:
encrypter- the encrypter bean- Throws:
ComponentInitializationException- for init errors
-
-
Method Detail
-
encrypt
public void encrypt(SignMessage signMessage, String entityID) throws EncryptionException
Given a sign message holding a cleartextMessageelement, the method encrypts the message using the default encryption configuration and updates the suppliedsignMessageso that it holds anEncryptedMessageinstead.- Parameters:
signMessage- the sign message holding the message to encryptentityID- the SAML entityID of the IdP that is the recipient of the message (and to whom we encrypt for)- Throws:
EncryptionException- for errors during encryption- See Also:
encrypt(SignMessage, String, EncryptionConfiguration)
-
encrypt
public void encrypt(SignMessage signMessage, String entityID, EncryptionConfiguration configuration) throws EncryptionException
Given a sign message holding a cleartextMessageelement, the method encrypts the message using the supplied encryption configuration and updates the suppliedsignMessageso that it holds anEncryptedMessageinstead.- Parameters:
signMessage- the sign message holding the message to encryptentityID- 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:
EncryptionException- for errors during encryption
-
-