Package org.opensaml.xmlsec.keyinfo.impl
Class KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
java.lang.Object
org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
org.opensaml.xmlsec.keyinfo.impl.KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
- All Implemented Interfaces:
KeyInfoGenerator
- Enclosing class:
- KeyAgreementKeyInfoGeneratorFactory
public class KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
extends BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
An implementation of
KeyInfoGenerator
capable of handling the information
contained within a KeyAgreementCredential
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final XMLObjectBuilder<AgreementMethod>
Builder for AgreementMethod objects.private final org.slf4j.Logger
Class logger.The set of options to be used by the generator. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
KeyAgreementKeyInfoGenerator
(KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions newOptions, Class<? extends KeyInfo> type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongenerate
(Credential credential) Generate a new KeyInfo object based on keying material and other information within a credential.private void
processAgreementParameters
(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) private void
processOriginatorKeyInfo
(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) Process theKeyAgreementCredential.getOriginatorCredential()
.private void
processRecipientKeyInfo
(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) Methods inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
buildKeyInfo, classToElementName, processEntityID, processKeyNames, processPublicKey
-
Field Details
-
log
private final org.slf4j.Logger logClass logger. -
options
The set of options to be used by the generator. -
agreementMethodBuilder
Builder for AgreementMethod objects.
-
-
Constructor Details
-
KeyAgreementKeyInfoGenerator
protected KeyAgreementKeyInfoGenerator(KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions newOptions, Class<? extends KeyInfo> type) Constructor.- Parameters:
newOptions
- the options to be used by the generatortype
- the KeyInfo element type
-
-
Method Details
-
generate
Generate a new KeyInfo object based on keying material and other information within a credential.- Specified by:
generate
in interfaceKeyInfoGenerator
- Overrides:
generate
in classBasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
- Parameters:
credential
- the credential containing keying material and possibly other information- Returns:
- a new KeyInfo object or null if nothing was generated
- Throws:
SecurityException
- thrown if there is any error generating the new KeyInfo from the credential
-
processAgreementParameters
private void processAgreementParameters(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException - Parameters:
keyInfo
- the KeyInfo that is being builtagreementMethod
- the AgreementMethod that is being builtcredential
- the Credential that is being processed- Throws:
SecurityException
- if there is a fatal error processing any agreement parameters
-
processOriginatorKeyInfo
private void processOriginatorKeyInfo(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException Process theKeyAgreementCredential.getOriginatorCredential()
.- Parameters:
keyInfo
- the KeyInfo that is being builtagreementMethod
- the AgreementMethod that is being builtcredential
- the Credential that is being processed- Throws:
SecurityException
- if there is a fatal error processing the originator KeyInfo
-
processRecipientKeyInfo
private void processRecipientKeyInfo(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException - Parameters:
keyInfo
- the KeyInfo that is being builtagreementMethod
- the AgreementMethod that is being builtcredential
- the Credential that is being processed- Throws:
SecurityException
- if there is a fatal error processing the recipient KeyInfo
-