By: Nils Behlen user 25 Aug 2020 at 6:15 a.m. CDT

16 Responses
Nils Behlen gravatar
Hi, im working on a Person Authentication script. Ive set the working parameter in `prepareForStep`: ``` identity = CdiUtil.bean(Identity) identity.setWorkingParameter("test", "test") ``` then trying to access it in the xhtml: ``` <h:outputText value="#{identity.getWorkingParameter('test')}" /> ``` I also added `return Arrays.asList("test")` to `getExtraParametersForStep`. However, it is not rendered.

By Madhumita Subramaniam staff 25 Aug 2020 at 12:46 p.m. CDT

Madhumita Subramaniam gravatar
Hi, I ran a sample script and it worked as intended. If the below example doesnt help you, please attach code. As an example of the same, you can refer to - 1. For identity.setWorkingParameter , look [here](https://github.com/GluuFederation/oxAuth/blob/52a077edfedfda26d3c689c1f323864d251bfb4f/Server/integrations/otp/OtpExternalAuthenticator.py#L206) --> self.setRequestScopedParameters(identity) 1. For usage in an xhtml file - look at [enroll.xhtml](http://https://github.com/GluuFederation/oxAuth/blob/master/Server/src/main/webapp/auth/otp/enroll.xhtml). Here you can do an h:outputText - ```

By Nils Behlen user 27 Aug 2020 at 5:11 a.m. CDT

Nils Behlen gravatar
Hi, that did not help, because that is what i'm already doing. With the following script: ``` from org.gluu.service.cdi.util import CdiUtil from org.gluu.oxauth.security import Identity from org.gluu.model.custom.script.type.auth import PersonAuthenticationType from org.gluu.oxauth.service import AuthenticationService from org.gluu.util import StringHelper from java.util import Arrays class PersonAuthentication(PersonAuthenticationType): def __init__(self, currentTimeMillis): self.currentTimeMillis = currentTimeMillis def init(self, configurationAttributes): print "Basic. Initialized successfully" return True def destroy(self, configurationAttributes): print "Basic. Destroyed successfully" return True def getApiVersion(self): return 1 def isValidAuthenticationMethod(self, usageType, configurationAttributes): print "Basic. isValidAuthenticationMethod" return True def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes): print "Basic. getAlternativeAuthenticationMethod" return None def authenticate(self, configurationAttributes, requestParameters, step): authenticationService = CdiUtil.bean(AuthenticationService) print "Basic. Authenticate for step {}".format(step) identity = CdiUtil.bean(Identity) identity.setWorkingParameter("test", "test") user_name = requestParameters.get("username")[0].strip() logged_in = False if (StringHelper.isNotEmptyString(user_name)): logged_in = authenticationService.authenticate(user_name) return logged_in return False def prepareForStep(self, configurationAttributes, requestParameters, step): print "Basic. prepareForStep" identity = CdiUtil.bean(Identity) identity.setWorkingParameter("test", "test") print "Basic. Working Parameter set" return True def getExtraParametersForStep(self, configurationAttributes, step): print "Basic. getExtraParametersForStep" return Arrays.asList("test") def getCountAuthenticationSteps(self, configurationAttributes): print "Basic. getCountAuthenticationSteps" return 2 def getPageForStep(self, configurationAttributes, step): print "Basic. getPageForStep" return "/auth/test/test.xhtml" def logout(self, configurationAttributes, requestParameters): print "Basic. logout" return True ``` and this xhtml file: ``` <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" template="/WEB-INF/incl/layout/login-template.xhtml"> <ui:define name="body"> <div class="container"> <h:panelGroup rendered="true"> <div class="login_bx_1" style="border-radius: 10px; margin-top: 0px; background: white; border: 1px solid #008b8b;"> <div class="row"> <h:messages class="text-center" style="color:#4ca4ec;margin:5px;margin-left:20px; font-size:1vw;" infoClass="text-center" errorClass="text-center" /> </div> <h:form id="loginForm" style="padding:30px;" prependId="false"> <div class="form-group row"></div> <p> <h:outputText value="#{identity.getWorkingParameter('test')}" id="outputText" /> </p> <div class="form-group row"></div> <div class="form-group row"> <div class="col-sm-offset-2 offset-md-2 col-sm-8 col-md-8"> <h:inputText placeholder="Username" colMd="10" id="username" name="username" labelColMd="2" value="#{username}" autocomplete="off" styleClass="form-control" tyle="width:100%"> </h:inputText> </div> </div> <div class="form-group row"></div> <div class="form-group row"> <div class="col-sm-offset-2 offset-md-2 col-sm-8 col-md-8"> <h:commandButton id="loginButton" style="background-color: #00BE79; color:white;" styleClass="btn col-sm-12" value=" #{msgs['login.login']}" iconAwesome="fa-sign-in" action="#{authenticator.authenticate}" /> </div> </div> <h:inputHidden id="platform" /> </h:form> </div> </h:panelGroup> </div> <script> window.onload = function () { var userfield = document.getElementById("username"); userfield.value = ""; userfield.focus(); //var opt = document.getElementById("outputText"); //var text = '${identity.getWorkingParameter('test')}'; //opt.innerHTML = text; }; </script> </ui:define> </ui:composition> ``` i get the following log when logging in: ``` 2020-08-27 10:06:17,002 INFO [qtp1590550415-16] Basic. getPageForStep 2020-08-27 10:06:19,074 INFO [qtp1590550415-14] Basic. Authenticate for step 1 2020-08-27 10:06:19,092 INFO [qtp1590550415-14] Basic. getExtraParametersForStep 2020-08-27 10:06:19,093 INFO [qtp1590550415-14] Basic. getCountAuthenticationSteps 2020-08-27 10:06:19,097 INFO [qtp1590550415-14] Basic. getPageForStep 2020-08-27 10:06:19,098 INFO [qtp1590550415-14] Basic. getExtraParametersForStep 2020-08-27 10:06:20,490 INFO [qtp1590550415-14] Basic. Authenticate for step 2 2020-08-27 10:06:20,502 INFO [qtp1590550415-14] Basic. getExtraParametersForStep 2020-08-27 10:06:20,503 INFO [qtp1590550415-14] Basic. getCountAuthenticationSteps 2020-08-27 10:06:20,506 INFO [qtp1590550415-14] Basic. getExtraParametersForStep ``` prepareForStep seems not to be called at all, but the working parameter is also set in authenticate which should make it visible at least in the second step, which is not the case. Trying to access `identity.getWorkingParameter('test')` with js did also not work (the commented part in the xhtml).

By Madhumita Subramaniam staff 27 Aug 2020 at 6:33 a.m. CDT

Madhumita Subramaniam gravatar
Hi Ben, Can you change the API version to 11 ? In all likelihood, it'll resolve your issue. def getApiVersion(self): return 11

By Nils Behlen user 27 Aug 2020 at 6:50 a.m. CDT

Nils Behlen gravatar
It didn't. Now i get: ``` Oops Something wrong happened. ×Login failed, oxTrust wasn't allowed to access user data ```

By Nils Behlen user 27 Aug 2020 at 7:05 a.m. CDT

Nils Behlen gravatar
The server version is 4.1.1 final. I can return 3 and the script works but it still does not show the WorkingParameter in the xhtml. Every api version >3 leads to the error above.

By Madhumita Subramaniam staff 27 Aug 2020 at 10:28 a.m. CDT

Madhumita Subramaniam gravatar
I hope you tried version 11 to be exact. I would not want you to experiment with anything other than that.

By Madhumita Subramaniam staff 27 Aug 2020 at 9:32 p.m. CDT

Madhumita Subramaniam gravatar
1. Attaching 2 files - modified basic.py 2. Note: change version to 11

By Nils Behlen user 31 Aug 2020 at 3:42 a.m. CDT

Nils Behlen gravatar
Hi, like i said, i get ``` Login failed, oxTrust wasn't allowed to access user data ``` when using your files aswell. But the workingParameter is shown.

By Madhumita Subramaniam staff 31 Aug 2020 at 4:16 a.m. CDT

Madhumita Subramaniam gravatar
Attach oxauth logs please.

By Nils Behlen user 31 Aug 2020 at 4:32 a.m. CDT

Nils Behlen gravatar
Which oxauth log? The oxauth_script.log looks like this: ``` ,983 INFO [qtp1590550415-16] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:240) - Basic. Prepare for step called 2020-08-31 09:30:57,983 INFO [qtp1590550415-16] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:240) - Basic. Prepare for Step 1 2020-08-31 09:31:01,310 INFO [qtp1590550415-15] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:240) - Basic. Authenticate for step 1 2020-08-31 09:31:01,348 INFO [qtp1590550415-15] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:240) - getApiVersion: 11 2020-08-31 09:31:01,517 INFO [qtp1590550415-12] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:240) - getApiVersion: 11 ```

By Madhumita Subramaniam staff 31 Aug 2020 at 5:05 a.m. CDT

Madhumita Subramaniam gravatar
The one that has a date format to it - e.g. 2020_08_31.jetty.log

By Nils Behlen user 31 Aug 2020 at 5:12 a.m. CDT

Nils Behlen gravatar
``` 2020-08-31 10:10:55,042 ERROR [qtp1590550415-11] [org.gluu.oxauth.service.AuthenticationService] (AuthenticationService.java:426) - Failed to authenticate DN: inum=0000!1E64.57EC,ou=people,o=gluu org.gluu.persist.exception.AuthenticationException: Failed to authenticate DN: inum=0000!1E64.57EC,ou=people,o=gluu at org.gluu.persist.ldap.impl.LdapEntryManager.authenticate(LdapEntryManager.java:745) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] at org.gluu.oxauth.service.AuthenticationService.authenticateImpl(AuthenticationService.java:399) ~[classes/:?] at org.gluu.oxauth.service.AuthenticationService.authenticate(AuthenticationService.java:345) ~[classes/:?] at org.gluu.oxauth.service.AuthenticationService.externalAuthenticate(AuthenticationService.java:278) ~[classes/:?] at org.gluu.oxauth.service.AuthenticationService.authenticate(AuthenticationService.java:125) ~[classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject.__call__(PyObject.java:494) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject.__call__(PyObject.java:498) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:156) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.pycode._pyx52.authenticate$9(answer.py:56) ~[?:?] at org.python.pycode._pyx52.call_function(answer.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:306) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:197) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyFunction.__call__(PyFunction.java:485) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcallexc(PyObject.java:3565) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcall(PyObject.java:3598) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.proxies.__main__$PersonAuthentication$48.authenticate(Unknown Source) ~[?:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService.executeExternalAuthenticate(ExternalAuthenticationService.java:196) ~[classes/:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService$Proxy$_$$_WeldClientProxy.executeExternalAuthenticate(Unknown Source) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.userAuthenticationInteractive(Authenticator.java:321) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticateImpl(Authenticator.java:204) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticate(Authenticator.java:132) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.apache.el.parser.AstValue.invoke(AstValue.java:247) ~[org.mortbay.jasper.apache-el-8.5.40.jar:8.5.40] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) ~[org.mortbay.jasper.apache-el-8.5.40.jar:8.5.40] at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) ~[weld-web-3.1.2.Final.jar:3.1.2.Final] at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) ~[weld-web-3.1.2.Final.jar:3.1.2.Final] at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:107) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UICommand.broadcast(UICommand.java:330) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:870) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1418) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.9.jar:2.3.9] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:201) ~[javax.faces-2.3.9.jar:2.3.9] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:670) ~[javax.faces-2.3.9.jar:2.3.9] at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1395) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) ~[jetty-security-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.Server.handle(Server.java:500) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] Caused by: org.gluu.persist.exception.operation.ConnectionException: Failed to authenticate dn at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.authenticate(LdapOperationsServiceImpl.java:214) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] at org.gluu.persist.ldap.impl.LdapEntryManager.authenticate(LdapEntryManager.java:743) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] ... 88 more Caused by: com.unboundid.ldap.sdk.LDAPBindException: invalid credentials at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2304) ~[unboundid-ldapsdk-4.0.14.jar:4.0.14] at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2259) ~[unboundid-ldapsdk-4.0.14.jar:4.0.14] at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.authenticateBindConnectionPoolImpl(LdapOperationsServiceImpl.java:285) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.authenticateImpl(LdapOperationsServiceImpl.java:242) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] at org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl.authenticate(LdapOperationsServiceImpl.java:212) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] at org.gluu.persist.ldap.impl.LdapEntryManager.authenticate(LdapEntryManager.java:743) ~[oxcore-persistence-ldap-4.1.1.Final.jar:?] ... 88 more 2020-08-31 10:10:55,074 INFO [qtp1590550415-11] [org.gluu.oxauth.service.AuthenticationService] (AuthenticationService.java:666) - Attempting to redirect user: SessionUser: SessionId {dn='43494fc2-0e7b-461d-a26d-e45d696f655d', id='43494fc2-0e7b-461d-a26d-e45d696f655d', lastUsedAt=Mon Aug 31 10:10:55 UTC 2020, userDn='inum=0000!1E64.57EC,ou=people,o=gluu', authenticationTime=Mon Aug 31 10:10:55 UTC 2020, state=authenticated, sessionState='619c1902bd113c3a03c17e2466bd3be61107ceaac98cc275dd72a91eb61b6e77.6f5291db-866b-4308-94c6-a2ae237d19ea', permissionGranted=null, isJwt=false, jwt=null, permissionGrantedMap=SessionIdAccessMap{permissionGranted={1001.1e509dce-7a95-41e1-b4f3-b51944630433=false}}, involvedClients=null, sessionAttributes={test=test, auth_external_attributes=[{"test":"java.lang.String"}], opbs=990cdd3e-d224-4ac2-acae-dd7bdbd070db, response_type=code, nonce=be0f0bf2-7c6a-44ea-8fd3-4eb7bd61f9fa, client_id=1001.1e509dce-7a95-41e1-b4f3-b51944630433, auth_step=1, acr=answer, remote_ip=10.1.0.6, auth_user=nils, scope=openid profile email user_name, acr_values=answer, redirect_uri=https://gluu.office.netknights.it/identity/authcode.htm, state=b0a7a380-ed03-47ef-b941-188d9cd4cb4e}, persisted=true} 2020-08-31 10:10:55,076 INFO [qtp1590550415-11] [org.gluu.oxauth.service.AuthenticationService] (AuthenticationService.java:674) - Attempting to redirect user: User: org.gluu.oxauth.model.common.User@5cd15637 2020-08-31 10:10:55,077 INFO [qtp1590550415-11] [org.gluu.oxauth.auth.Authenticator] (Authenticator.java:432) - Authentication success for User: 'nils' 2020-08-31 10:10:55,197 INFO [qtp1590550415-11] [org.gluu.oxauth.auth.Authenticator] (Authenticator.java:277) - Authentication success for Client: '1001.1e509dce-7a95-41e1-b4f3-b51944630433' 2020-08-31 10:10:55,204 ERROR [qtp1590550415-11] [org.gluu.oxauth.model.common.AuthorizationGrant] (AuthorizationGrant.java:266) - TypeError: getAuthenticationMethodClaims() takes exactly 2 arguments (1 given) org.python.core.PyException: TypeError: getAuthenticationMethodClaims() takes exactly 2 arguments (1 given) at org.python.core.Py.TypeError(Py.java:236) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:284) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyBaseCode.call(PyBaseCode.java:197) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyFunction.__call__(PyFunction.java:485) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcallexc(PyObject.java:3565) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.core.PyObject._jcall(PyObject.java:3598) ~[jython-standalone-2.7.2.jar:2.7.2] at org.python.proxies.__main__$PersonAuthentication$48.getAuthenticationMethodClaims(Unknown Source) ~[?:?] at org.gluu.oxauth.model.token.IdTokenFactory.setAmrClaim(IdTokenFactory.java:287) ~[classes/:?] at org.gluu.oxauth.model.token.IdTokenFactory.generateSignedIdToken(IdTokenFactory.java:128) ~[classes/:?] at org.gluu.oxauth.model.token.IdTokenFactory.createJwr(IdTokenFactory.java:518) ~[classes/:?] at org.gluu.oxauth.model.common.AuthorizationGrant.createIdToken(AuthorizationGrant.java:96) ~[classes/:?] at org.gluu.oxauth.model.common.AuthorizationGrant.createIdToken(AuthorizationGrant.java:251) ~[classes/:?] at org.gluu.oxauth.token.ws.rs.TokenRestWebServiceImpl.requestAccessToken(TokenRestWebServiceImpl.java:205) ~[classes/:?] at org.gluu.oxauth.token.ws.rs.TokenRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAccessToken(Unknown Source) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:510) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:401) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:365) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:361) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:367) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:339) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:312) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:441) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:231) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:137) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:361) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:140) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:217) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.gluu.server.filters.AbstractCorsFilter.handleNonCORS(AbstractCorsFilter.java:362) ~[oxcore-server-4.1.1.Final.jar:?] at org.gluu.server.filters.AbstractCorsFilter.doFilter(AbstractCorsFilter.java:139) ~[oxcore-server-4.1.1.Final.jar:?] at org.gluu.oxauth.filter.CorsFilter.doFilter(CorsFilter.java:110) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.gluu.oxauth.auth.AuthenticationFilter.processBasicAuth(AuthenticationFilter.java:283) ~[classes/:?] at org.gluu.oxauth.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:123) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) ~[jetty-security-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) ~[jetty-servlet-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.Server.handle(Server.java:500) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270) [jetty-server-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.ruTask(EatWhatYouKill.java:336) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.26.v20200117.jar:9.4.26.v20200117] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] ```

By Madhumita Subramaniam staff 31 Aug 2020 at 5:26 a.m. CDT

Madhumita Subramaniam gravatar
Refer to the sample script. All the default methods of the custom script are mandatory. Include this method in your code - (Similarly, if any other method is missing, please include that too) def getAuthenticationMethodClaims(self, requestParameters): return None

By Nils Behlen user 31 Aug 2020 at 5:30 a.m. CDT

Nils Behlen gravatar
Im using the script that you attached which includes that method

By Madhumita Subramaniam staff 31 Aug 2020 at 7:01 a.m. CDT

Madhumita Subramaniam gravatar
This is a version mismatch. I will verify this on gluu 4.1.

By Madhumita Subramaniam staff 01 Sep 2020 at 3:40 a.m. CDT

Madhumita Subramaniam gravatar
Hi Nils, Attaching two files.