Custom login theme and templates for cas 5.2.2

805 views
Skip to first unread message

Matthew Hannay

unread,
Feb 11, 2018, 6:35:54 PM2/11/18
to CAS Community
Is there some more complete documentation on how to build your own
login screen and make that the default in CAS........
I have found some info but it seems a bit light on and more complete guides are for prior versions?

The documentation talks about modifying or making custom login-webflow but no indication on where it shoulld be put or if I should 
modify the one in the downloaded template( I thought this would be bad!!)

I will continue to just try things like creating my own src/main/resources/webflow/login/login-webflow.xml
but it no substitution for a clear howto

If nothing exits I will write and contribute back .......

--Matt

Matthew Hannay

unread,
Feb 11, 2018, 6:42:47 PM2/11/18
to cas-...@apereo.org
I suppose I need to really understand how maven overlays work!!

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/42484e70-cc4c-4218-85d9-7d5ed9933029%40apereo.org.

Andy Ng

unread,
Feb 12, 2018, 12:00:11 AM2/12/18
to CAS Community
Hi Matt,

About "building your own login screen", and making it "the default in CAS", I think a better approach will be to use "theme" as specified here:
https://apereo.github.io/cas/5.2.x/installation/User-Interface-Customization-Themes.html

This might help you about the theme edit: https://groups.google.com/a/apereo.org/forum/#!topic/cas-user/k-yfoou7Zy0

Using login-webflow.xml to create another login view, you would need to change a lot of stuff, which will be pretty difficult and future CAS build might break your login-webflow.xml. Modifying login-webflow just for that, seems not a very CAS way to handle login screen modification.

Maybe you can try using theme first, before diving into login-webflow.xml if theme does not suit your needs.

Cheers!
- Andy



On Monday, 12 February 2018 07:42:47 UTC+8, Matthew Hannay wrote:
I suppose I need to really understand how maven overlays work!!
On 12 February 2018 at 09:35, Matthew Hannay <matthew...@gmail.com> wrote:
Is there some more complete documentation on how to build your own
login screen and make that the default in CAS........
I have found some info but it seems a bit light on and more complete guides are for prior versions?

The documentation talks about modifying or making custom login-webflow but no indication on where it shoulld be put or if I should 
modify the one in the downloaded template( I thought this would be bad!!)

I will continue to just try things like creating my own src/main/resources/webflow/login/login-webflow.xml
but it no substitution for a clear howto

If nothing exits I will write and contribute back .......

--Matt

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

Matthew Hannay

unread,
Feb 12, 2018, 12:39:28 AM2/12/18
to CAS Community
Just 1 thing is not 100% clear

Do I copy all of
overlays/org...cas-server-webapp-tomcat-5.2.2/WEB-INF/classes/templates

to 

scr/main/resources/templates


and then create 

scr/main/resources/templates/mytemplate/casLoginView.html 
(I want this on to look different to the supplied)

or just copy all of the templates and modify as required 

--Matt

Matthew Hannay

unread,
Feb 12, 2018, 1:13:42 AM2/12/18
to CAS Community
so I create
src/main/resources/templates/mytemplate/casLoginView.html

And I get the desired result. The custom page I am after.

--Matt

Robert Oschwald

unread,
Feb 12, 2018, 3:47:36 AM2/12/18
to cas-...@apereo.org
Just copy the page / resources you want to modify.
This way, it is also easier for you to compare if you want to upgrade to a newer version of CAS.




Reply all
Reply to author
Forward
0 new messages