Class ExtendedSignerProviderInitializer
java.lang.Object
se.swedenconnect.opensaml.xmlsec.signature.support.provider.ExtendedSignerProviderInitializer
- All Implemented Interfaces:
org.opensaml.core.config.Initializer
public class ExtendedSignerProviderInitializer
extends Object
implements org.opensaml.core.config.Initializer
OpenSAML uses the Java service loader to load the
SignerProvider
that should be used. Any number of providers
may be on the classpath and if we want to have a particular one loaded (and cached) by the Signer
class we
have to make sure that this one is before any other provider on the classpath. So, not an ideal case, but not a
problem since the only provider used in a default setup is ApacheSantuarioSignerProviderImpl
. But since we
extend this class with workraounds for RSAPSS, we want to make sure that our ExtendedSignerProvider
is loaded
before the default provider, no matter how the classpath looks.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init()
TheSigner
class has a static signer provider cached.
-
Constructor Details
-
ExtendedSignerProviderInitializer
public ExtendedSignerProviderInitializer()
-
-
Method Details
-
init
public void init() throws org.opensaml.core.config.InitializationExceptionTheSigner
class has a static signer provider cached. This provider is set the first time theSigner.signObject(org.opensaml.xmlsec.signature.Signature)
method is called. So what we want to do is to modify the classpath so that the resource that holds our extended signer provider is always found first. Once, that is done, we invoke thesignObject
method which will set the cached provider to our implementation.- Specified by:
init
in interfaceorg.opensaml.core.config.Initializer
- Throws:
org.opensaml.core.config.InitializationException
-