Class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator

  • All Implemented Interfaces:
    org.opensaml.xmlsec.keyinfo.KeyInfoGenerator
    Direct Known Subclasses:
    X509KeyInfoGeneratorFactory.X509KeyInfoGenerator
    Enclosing class:
    BasicKeyInfoGeneratorFactory

    public class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
    extends Object
    implements org.opensaml.xmlsec.keyinfo.KeyInfoGenerator
    An implementation of KeyInfoGenerator capable of handling the information contained within a Credential.
    • Field Detail

      • keyInfoBuilder

        private final org.opensaml.core.xml.XMLObjectBuilder<org.opensaml.xmlsec.signature.KeyInfo> keyInfoBuilder
        Builder for KeyInfo objects.
    • Constructor Detail

    • Method Detail

      • generate

        @Nullable
        public org.opensaml.xmlsec.signature.KeyInfo generate​(@Nullable
                                                              org.opensaml.security.credential.Credential credential)
                                                       throws org.opensaml.security.SecurityException
        Specified by:
        generate in interface org.opensaml.xmlsec.keyinfo.KeyInfoGenerator
        Throws:
        org.opensaml.security.SecurityException
      • processKeyNames

        protected void processKeyNames​(@Nonnull
                                       org.opensaml.xmlsec.signature.KeyInfo keyInfo,
                                       @Nonnull
                                       org.opensaml.security.credential.Credential credential)
        Process the values of Credential.getKeyNames().
        Parameters:
        keyInfo - the KeyInfo that is being built
        credential - the Credential that is geing processed
      • processEntityID

        protected void processEntityID​(@Nonnull
                                       org.opensaml.xmlsec.signature.KeyInfo keyInfo,
                                       @Nonnull
                                       org.opensaml.security.credential.Credential credential)
        Process the value of Credential.getEntityId().
        Parameters:
        keyInfo - the KeyInfo that is being built
        credential - the Credential that is geing processed
      • processPublicKey

        protected void processPublicKey​(@Nonnull
                                        org.opensaml.xmlsec.signature.KeyInfo keyInfo,
                                        @Nonnull
                                        org.opensaml.security.credential.Credential credential)
                                 throws org.opensaml.security.SecurityException
        Process the value of Credential.getPublicKey().
        Parameters:
        keyInfo - the KeyInfo that is being built
        credential - the Credential that is being processed
        Throws:
        org.opensaml.security.SecurityException - if the public key can't be encoded properly