No applicationContext is set in saml authenticator.

Showing results for 
Search instead for 
Did you mean: 
Member II

No applicationContext is set in saml authenticator.


I get the following stacktrace:

 java.lang.IllegalStateException: Application Context must be set programatically for Authenticator.
at org.springframework.extensions.webscripts.connector.AbstractAuthenticator.getConnectorService(

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??





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)

return auth;