11-15-2021 07:07 AM
Hi.
I get the following stacktrace:
java.lang.IllegalStateException: Application Context must be set programatically for Authenticator.
at org.springframework.extensions.webscripts.connector.AbstractAuthenticator.getConnectorService(AbstractAuthenticator.java:72)
We have slotted in the saml module, version 1.2.2
But the authenticator 'CustomSAMLAlfrescoAuthenticator' has no applicationContext set.
The authenticator is constructed in TennantSAMLConnectorService.
When an ordinary Authenticator is constructed, then an applicationContext is set on the Authenticator. See the method ConnectorSevice.buildAuthenticator.
Is this a bug??
Greetings,
Wybrand.
ConnectorService.buildAuthenticator:
private Authenticator buildAuthenticator(String className)
throws ConnectorServiceException
{
Authenticator auth = (Authenticator)ReflectionHelper.newObject(className);
if (auth == null)
{
throw new ConnectorServiceException("Unable to instantiate Authenticator: " + className);
}
// Set the application context for the Authenticator object
// TODO: Authenticators should be Spring beans, but due to legacy config they are constructed from class names
if (auth instanceof ApplicationContextAware)
{
((ApplicationContextAware)auth).setApplicationContext(applicationContext);
}
return auth;
}
Explore our Alfresco products with the links below. Use labels to filter content by product module.