Package org.opensaml.xmlsec.keyinfo.impl
Class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
- java.lang.Object
-
- org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
-
- All Implemented Interfaces:
KeyInfoGenerator
- Direct Known Subclasses:
X509KeyInfoGeneratorFactory.X509KeyInfoGenerator
- Enclosing class:
- BasicKeyInfoGeneratorFactory
public class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator extends Object implements KeyInfoGenerator
An implementation ofKeyInfoGeneratorcapable of handling the information contained within aCredential.
-
-
Field Summary
Fields Modifier and Type Field Description private XMLObjectBuilder<KeyInfo>keyInfoBuilderBuilder for KeyInfo objects.private BasicKeyInfoGeneratorFactory.BasicOptionsoptionsThe set of options to be used by the generator.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasicKeyInfoGenerator(BasicKeyInfoGeneratorFactory.BasicOptions newOptions)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyInfogenerate(Credential credential)protected voidprocessEntityID(KeyInfo keyInfo, Credential credential)Process the value ofCredential.getEntityId().protected voidprocessKeyNames(KeyInfo keyInfo, Credential credential)Process the values ofCredential.getKeyNames().protected voidprocessPublicKey(KeyInfo keyInfo, Credential credential)Process the value ofCredential.getPublicKey().
-
-
-
Field Detail
-
options
private final BasicKeyInfoGeneratorFactory.BasicOptions options
The set of options to be used by the generator.
-
keyInfoBuilder
private final XMLObjectBuilder<KeyInfo> keyInfoBuilder
Builder for KeyInfo objects.
-
-
Constructor Detail
-
BasicKeyInfoGenerator
protected BasicKeyInfoGenerator(@Nonnull BasicKeyInfoGeneratorFactory.BasicOptions newOptions)Constructor.- Parameters:
newOptions- the options to be used by the generator
-
-
Method Detail
-
generate
@Nullable public KeyInfo generate(@Nullable Credential credential) throws SecurityException
- Specified by:
generatein interfaceKeyInfoGenerator- Throws:
SecurityException
-
processKeyNames
protected void processKeyNames(@Nonnull KeyInfo keyInfo, @Nonnull Credential credential)Process the values ofCredential.getKeyNames().- Parameters:
keyInfo- the KeyInfo that is being builtcredential- the Credential that is geing processed
-
processEntityID
protected void processEntityID(@Nonnull KeyInfo keyInfo, @Nonnull Credential credential)Process the value ofCredential.getEntityId().- Parameters:
keyInfo- the KeyInfo that is being builtcredential- the Credential that is geing processed
-
processPublicKey
protected void processPublicKey(@Nonnull KeyInfo keyInfo, @Nonnull Credential credential) throws SecurityExceptionProcess the value ofCredential.getPublicKey().- Parameters:
keyInfo- the KeyInfo that is being builtcredential- the Credential that is being processed- Throws:
SecurityException- if the public key can't be encoded properly
-
-