One update: It seems that Gluu is trying to get something else than the simple boolean from authenticate method from the custom script. I found in oxauth_script.log the following stack trace:
> 2018-01-17 09:12:38,355 ERROR [qtp359023572-19] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:167) - null
> org.python.core.PyException: null
> at org.python.core.Py.TypeError(Py.java:259) ~[jython-2.7.0.jar:?]
> at org.python.core.PyObject._basic_add(PyObject.java:2141) ~[jython-2.7.0.jar:?]
> at org.python.core.PyObject._add(PyObject.java:2119) ~[jython-2.7.0.jar:?]
> at org.python.pycode._pyx3.authenticate$8(<iostream>:62) ~[?:?]
> at org.python.pycode._pyx3.call_function(<iostream>) ~[?:?]
> at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[jython-2.7.0.jar:?]
> at org.python.core.PyBaseCode.call(PyBaseCode.java:307) ~[jython-2.7.0.jar:?]
> at org.python.core.PyBaseCode.call(PyBaseCode.java:198) ~[jython-2.7.0.jar:?]
> at org.python.core.PyFunction.__call__(PyFunction.java:482) ~[jython-2.7.0.jar:?]
> at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-2.7.0.jar:?]
> at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-2.7.0.jar:?]
> at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-2.7.0.jar:?]
> at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-2.7.0.jar:?]
> at org.python.core.PyObject._jcallexc(PyObject.java:3626) ~[jython-2.7.0.jar:?]
> at org.python.core.PyObject._jcall(PyObject.java:3658) ~[jython-2.7.0.jar:?]
> at org.python.proxies.__builtin__$PersonAuthentication$3.authenticate(Unknown Source) ~[?:?]
> at org.xdi.oxauth.service.external.ExternalAuthenticationService.executeExternalAuthenticate(ExternalAuthenticationService.java:165) [classes/:?]
Looking at line 165 for that classe (at github branch version3.1.1) I found:
```
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
```
And in oxauth.log I found:
> 2018-01-17 09:12:38,382 INFO [qtp359023572-19] [org.xdi.oxauth.auth.Authenticator] (Authenticator.java:152) - Authentication failed for 'admin'
> 2018-01-17 09:15:47,122 ERROR [qtp359023572-12] [org.xdi.oxauth.auth.Authenticator] (Authenticator.java:212) - Failed to get session attributes
which seems to indicate that Gluu is trying to get session attributes for the authenticated user. This is reasonable to expect, but in the custom script documentation there is no indication that the script should implement this.
What is missing in my script?
Thanks.