Class ExtendedSignerProviderInitializer
java.lang.Object
se.swedenconnect.opensaml.xmlsec.signature.support.provider.ExtendedSignerProviderInitializer
- All Implemented Interfaces:
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
-
Constructor Details
-
ExtendedSignerProviderInitializer
public ExtendedSignerProviderInitializer()
-
-
Method Details
-
init
TheSigner
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 interfaceInitializer
- Throws:
InitializationException
-