public class SignMessageBuilder extends se.litsec.opensaml.core.AbstractSAMLObjectBuilder<SignMessage>
SignMessage
instance using the builder patterns.Constructor and Description |
---|
SignMessageBuilder() |
Modifier and Type | Method and Description |
---|---|
SignMessage |
buildEncrypted(Credential keyEncryptionCredential) |
SignMessage |
buildEncrypted(se.litsec.opensaml.saml2.metadata.provider.MetadataProvider metadataProvider) |
static SignMessageBuilder |
builder()
Utility method that creates a builder.
|
SignMessageBuilder |
dataEncryptionParameters(DataEncryptionParameters parameters)
Assigns the data encryption parameters to use when encrypting.
|
SignMessageBuilder |
displayEntity(String displayEntity)
Assigns the entityID of the entity responsible for displaying the sign message to the signer.
|
protected Class<SignMessage> |
getObjectType() |
SignMessageBuilder |
keyEncryptionParameters(KeyEncryptionParameters parameters)
Assigns the key encryption parameters to use when encrypting.
|
SignMessageBuilder |
message(String message)
Assigns the message to include.
|
SignMessageBuilder |
mimeType(SignMessageMimeTypeEnum mimeType)
Assigns the MIME type of the message.
|
SignMessageBuilder |
mustShow(Boolean mustShow)
Assigns the
MustShow attribute. |
public static SignMessageBuilder builder()
public SignMessage buildEncrypted(Credential keyEncryptionCredential) throws EncryptionException
EncryptionException
public SignMessage buildEncrypted(se.litsec.opensaml.saml2.metadata.provider.MetadataProvider metadataProvider) throws EncryptionException
EncryptionException
public SignMessageBuilder dataEncryptionParameters(DataEncryptionParameters parameters)
EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256
algorithm.
Note the JCE unlimited strength policy files must be installed for using strong crypto. For Java 8, download it from http://www.oracle.com/ technetwork/java/javase/downloads/jce8-download-2133166.html.
parameters
- data encryption parameterspublic SignMessageBuilder keyEncryptionParameters(KeyEncryptionParameters parameters)
EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSA15
algorithm.
Note: The encryption credential (DataEncryptionParameters.setEncryptionCredential(Credential)
) should not be
given in the supplied parameter. This will be added by the buildEncrypted
methods.
Note that if an algorithm that uses larger keys is required the JCE unlimited strength policy files must be installed. For Java 8, download it from http://www.oracle.com/ technetwork/java/javase/downloads/jce8-download-2133166.html.
parameters
- key encryption parameterspublic SignMessageBuilder message(String message)
If the message should be encrypted, the SignMessage
should be built using
buildEncrypted(Credential)
or buildEncrypted(MetadataProvider)
. For sign messages in cleartext
use the ordinary AbstractSAMLObjectBuilder.build()
method.
message
- the message to include (in cleartext)public SignMessageBuilder displayEntity(String displayEntity)
displayEntity
- the entityID of the recipientpublic SignMessageBuilder mimeType(SignMessageMimeTypeEnum mimeType)
mimeType
- the MIME typepublic SignMessageBuilder mustShow(Boolean mustShow)
MustShow
attribute. When this parameter is set to true
then the requested signature
MUST NOT be created unless this message has been displayed and accepted by the signer.mustShow
- the must show flagprotected Class<SignMessage> getObjectType()
getObjectType
in class se.litsec.opensaml.core.AbstractSAMLObjectBuilder<SignMessage>
Copyright © 2018 Litsec AB. All rights reserved.