Class SignMessageEncrypter
java.lang.Object
se.swedenconnect.opensaml.sweid.saml2.signservice.SignMessageEncrypter
Bean for encrypting
SignMessage objects.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencrypt(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 Details
-
SignMessageEncrypter
Constructor.- Parameters:
encrypter- the encrypter bean- Throws:
ComponentInitializationException- for init errors
-
-
Method Details
-
encrypt
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
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
-