By: Guy Parker named 17 Aug 2017 at 11:14 a.m. CDT

9 Responses
Guy Parker gravatar
With reference to: https://support.gluu.org/customization/2580/custom-authentication-with-custom-parameterised-page-packaging-for-deployment/ and the question: > "B) If I would like to avoid unpack & repack oxAuth.war file, what's the best alternative way to deploy/package the custom pages (the page path returned by getPageForStep function)?" Nearly 18 months later is there any update on the reply: > "Yes, it's not user friendly to put custom page into oxauth now. During development I put them to exploded war... > > We planned to start work on this issue at the end of this week or on start of next week to find out more elegant approach to store custom login pages and web resources."

By Aliaksandr Samuseu staff 17 Aug 2017 at 11:25 a.m. CDT

Aliaksandr Samuseu gravatar
Hi, Guy. Please check [this document](https://gluu.org/docs/ce/3.0.2/operation/custom-loginpage/) describing the current approach to pages' customization. You don't need to re-pack .war archives any more.

By William Lowe user 17 Aug 2017 at 11:25 a.m. CDT

William Lowe gravatar
> Nearly 18 months later... It's a big project, and we are doing out best on a number of fronts. And yes, customizing pages has been overhauled. Please see our [docs](https://gluu.org/docs/ce/3.0.2/operation/custom-loginpage/).

By Guy Parker named 17 Aug 2017 at 12:20 p.m. CDT

Guy Parker gravatar
Thanks. So do the same rules and methods described there for customizing an existing public page apply to completely custom pages defined via getPageForStep in a custom script?

By Aliaksandr Samuseu staff 17 Aug 2017 at 12:51 p.m. CDT

Aliaksandr Samuseu gravatar
Please disregard my previous post, I've got confused a bit. You can study some ready custom scripts to learn how they manages their customized pages, for example [gplus script](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/gplus/GooglePlusExternalAuthenticator.py#L366) The actual page is here: ``` find /opt/ -ipath '*gpluslogin.xhtml' /opt/jetty-9.3/temp/jetty-localhost-8081-oxauth.war-_oxauth-any-7737938786669492829.dir/webapp/auth/gplus/gpluslogin.xhtml ``` You could try to override it with your own customized its version by placing the latter one at next path: `/opt/gluu/jetty/oxauth/custom/pages/auth/gplus/gpluslogin.xhtml` Let's us know whether it will work for you.

By Guy Parker named 18 Aug 2017 at 3:51 a.m. CDT

Guy Parker gravatar
Thanks. I guess what I am trying to understand is does this customization mechanism only work for pages you already have in the oxauth.war? Or can I add in a new file like /opt/gluu/jetty/oxauth/custom/pages/auth/mycustom/step1.xhtml

By Aliaksandr Samuseu staff 18 Aug 2017 at 9:34 a.m. CDT

Aliaksandr Samuseu gravatar
You should be able to add new pages as well. Please let us know if you won't be.

By William Lowe user 05 Sep 2017 at 11:26 a.m. CDT

William Lowe gravatar
Guy, Were you able to achieve your intended requirement? Also, if you think we can be more clear in the docs, please feel free to submit a merge request to the proper docs page. Thanks, Will

By Guy Parker named 06 Sep 2017 at 3:08 a.m. CDT

Guy Parker gravatar
Hi Will. No I was not able to add new pages. I can only customize existing ones. I added /opt/gluu/jetty/oxauth/custom/pages/auth/test.xhtml and /opt/gluu/jetty/oxauth/custom/pages/auth/test.page.xml with appropriate content then restarted gluu-serverd-3.0.2 I received a 404 error trying to access the URL defined in the rewrite pattern in test.page.xml (/auth/test) Thanks, Guy

By Aliaksandr Samuseu staff 06 Sep 2017 at 8:39 a.m. CDT

Aliaksandr Samuseu gravatar
Could you provide full url that gives you 404? Also, could you elaborate on this? >defined in the rewrite pattern What pattern is it? Some actual code's/config file's fragments would help.