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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encrypt
(SignMessage signMessage, String entityID) Given a sign message holding a cleartextMessage
element, the method encrypts the message using the default encryption configuration and updates the suppliedsignMessage
so that it holds anEncryptedMessage
instead.void
encrypt
(SignMessage signMessage, String entityID, org.opensaml.xmlsec.EncryptionConfiguration configuration) Given a sign message holding a cleartextMessage
element, the method encrypts the message using the supplied encryption configuration and updates the suppliedsignMessage
so that it holds anEncryptedMessage
instead.
-
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 cleartextMessage
element, the method encrypts the message using the default encryption configuration and updates the suppliedsignMessage
so that it holds anEncryptedMessage
instead.- 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:
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 cleartextMessage
element, the method encrypts the message using the supplied encryption configuration and updates the suppliedsignMessage
so that it holds anEncryptedMessage
instead.- 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:
org.opensaml.xmlsec.encryption.support.EncryptionException
- for errors during encryption
-