It is a sample application to interface with Lithium Community Standard Cookie SSO
you need NOT to know grail/groovy to run this application. You may run it with any windows server, through the instruction below is for a Unix user.
- cd .
- change to home directory
- latest Grails release URL can be found with http://www.grails.org/download
- unzip grails-2.3.6.zip
- "grails-2.3.6/" will be added to your home directory
- rm grails-2.3.6.zip
- vi +$ .bash_profile
- add "export GRAILS_HOME=~/grails-2.3.6"
- add "export PATH=$PATH:$GRAILS_HOME/bin"
- . bash_profile
- just to reload what we set in previous step
- from command,
- cd
- grails upgrade
- cd /grails-app/services/lithium/apac/apacsso
- vi +$ LithiumSSOService.groovy
- update the setting string which will pass to Lithium Community
- reqRemoteAddr = request.getHeader("HTTP_X_FORWARDED_FOR" supports to get the real IP address if the application is behind a firewall.
- save the file
- cd /grails-app/conf/
- vi +$ Config.groovy
- update grails.mail.default.from, grails.mail.username, grails.mail.password
- we need this configuration to confirm the registration.
- grails.plugin.springsecurity.ui.register.postRegisterUrl
- this is the URL after user verified the registration.
- save the file
this is for passing a referer to the registration link, if user didn't click ->register from community directly, but use ->login->register
- cd /grails-app/view/login/
- vi +$ auth.gsp
- look for http://apac.sage.lithium.com, update to your community url
- save the file
- cd
- grails run-app
- for better performance, you can use "grails -Ddisable.auto.recompile=true run-app", but after you change any groovy files, you may need to run "grails compile" first.
- you will see something like "Server running. Browse to http://localhost:8090/"
- Community -> Admin->SSO, shortcut: https://apac.stage.lithium.com/t5/bizapps/bizappspage/tab/community%3Aadmin%3Asystem%3Asso
- update the SSO hostname in hyperlinks below
- SSO registration page: http://haidong-gu2.vm.lithium.com:8090/SSORegister
- SSO login page: http://haidong-gu2.vm.lithium.com:8090/SSOLogin
- SSO logoff page: http://haidong-gu2.vm.lithium.com:8090/SSOLogout
- the default setting is to use in-memory database (development), to set a persistent database (production), you can use "grails prod run-app", instead of "grails run-app".
- you may have to make sure your community and SSO server are in the same domain. To run it locally, just "hack" your windows localhost file or Unix hosts file.