Class SingleKeyResolver


  • public class SingleKeyResolver
    extends org.apache.xml.security.keys.keyresolver.KeyResolverSpi
    Resolves a single Key based on the KeyName.
    • Constructor Detail

      • SingleKeyResolver

        public SingleKeyResolver​(String keyName,
                                 PublicKey publicKey)
        Constructor.
        Parameters:
        keyName -
        publicKey -
      • SingleKeyResolver

        public SingleKeyResolver​(String keyName,
                                 PrivateKey privateKey)
        Constructor.
        Parameters:
        keyName -
        privateKey -
      • SingleKeyResolver

        public SingleKeyResolver​(String keyName,
                                 SecretKey secretKey)
        Constructor.
        Parameters:
        keyName -
        secretKey -
    • Method Detail

      • engineCanResolve

        protected boolean engineCanResolve​(Element element,
                                           String baseURI,
                                           org.apache.xml.security.keys.storage.StorageResolver storage)
        This method returns whether the KeyResolverSpi is able to perform the requested action.
        Specified by:
        engineCanResolve in class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
        Returns:
        whether the KeyResolverSpi is able to perform the requested action.
      • engineResolvePublicKey

        protected PublicKey engineResolvePublicKey​(Element element,
                                                   String baseURI,
                                                   org.apache.xml.security.keys.storage.StorageResolver storage,
                                                   boolean secureValidation)
                                            throws org.apache.xml.security.keys.keyresolver.KeyResolverException
        Method engineResolvePublicKey
        Specified by:
        engineResolvePublicKey in class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
        Returns:
        resolved public key from the registered from the element.
        Throws:
        org.apache.xml.security.keys.keyresolver.KeyResolverException
      • engineResolveX509Certificate

        protected X509Certificate engineResolveX509Certificate​(Element element,
                                                               String baseURI,
                                                               org.apache.xml.security.keys.storage.StorageResolver storage,
                                                               boolean secureValidation)
                                                        throws org.apache.xml.security.keys.keyresolver.KeyResolverException
        Method engineResolveCertificate
        Specified by:
        engineResolveX509Certificate in class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
        Returns:
        resolved X509Certificate key from the registered from the elements
        Throws:
        org.apache.xml.security.keys.keyresolver.KeyResolverException
      • engineResolveSecretKey

        protected SecretKey engineResolveSecretKey​(Element element,
                                                   String baseURI,
                                                   org.apache.xml.security.keys.storage.StorageResolver storage,
                                                   boolean secureValidation)
                                            throws org.apache.xml.security.keys.keyresolver.KeyResolverException
        Method engineResolveSecretKey
        Specified by:
        engineResolveSecretKey in class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
        Returns:
        resolved SecretKey key from the registered from the elements
        Throws:
        org.apache.xml.security.keys.keyresolver.KeyResolverException
      • engineResolvePrivateKey

        public PrivateKey engineResolvePrivateKey​(Element element,
                                                  String baseURI,
                                                  org.apache.xml.security.keys.storage.StorageResolver storage,
                                                  boolean secureValidation)
                                           throws org.apache.xml.security.keys.keyresolver.KeyResolverException
        Method engineResolvePrivateKey
        Specified by:
        engineResolvePrivateKey in class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
        Returns:
        resolved PrivateKey key from the registered from the elements
        Throws:
        org.apache.xml.security.keys.keyresolver.KeyResolverException