By: Jajati Badu Account Admin 14 Sep 2017 at 2:20 p.m. CDT

1 Response
Jajati Badu gravatar
Could you please help on a auth script issue. We have kept the custom xhtml file at below location. When I pass acr value 'nixu-tupas' in Get Auth url, I am able to see the UI. But I am having problem on getting variable values from auth script (.Py) to custum UI (.xhtml) /opt/gluu-server-3.1.0/opt/gluu/jetty/oxauth/custom/pages/auth/strongauth/strongauthlogin.xhtml Python file (Auth Script) ``` tupas_configs = [] bank_config = dict() bank_config["tupas_url"] = "https://www.tupasloginurl.com" tupas_configs.append(bank_config) context.set("tupas_configs", tupas_configs) ``` In Xhtml I am trying to access tupas url ``` #{tupas_configs.get(x)['tupas_url']} ``` Could you please help me to understand how to pass a variable value from Auth script to xhtml file ? Like custom xhtml paages which we can keep at oxauth/custom/pages/, can we create custom messages.properties file or we have to unpack oxauth.war file and add changes to messages.properties file? Many thanks for the help Kind Regards, Jajati

By Yuriy Movchan staff 18 Sep 2017 at 12:14 a.m. CDT

Yuriy Movchan gravatar
Hi Jajati, To get value in xhtml you can use next pattern. In script: ``` identity = CdiUtil.bean(Identity) ... identity.setWorkingParameter("tupas_configs", tupas_configs) ``` In XHTML: ``` #{identity.getWorkingParameter('tupas_configs')} ``` Moreover instead of Identity you can use own custom bean and get it instance from script. oxAuth supports custom libs. Your issue contains 2 question. You can try to put you updated messages file to ./resources folder... I'm going to assign this question to another developer to get more information if oxAuth supports custom message properties in this version or not.