source: trunk/grails-app/controllers/nl/tno/metagenomics/auth/LogoutController.groovy @ 2

Last change on this file since 2 was 2, checked in by robert@…, 8 years ago

Initial import of basic functionality

File size: 772 bytes
Line 
1package nl.tno.metagenomics.auth
2
3
4import org.codehaus.groovy.grails.commons.ConfigurationHolder
5
6class LogoutController {
7       
8        def index = {
9               
10                //clear user info from session
11                session.user = null
12                log.info("Session.User is now ${session.user}")
13                session.sessionToken = null
14                log.info("Session.sessionToken is now ${session.sessionToken}")
15               
16                //logout on GSCF side, and do not redirect back to metagenomics (&spring-security-redirect=${ConfigurationHolder.config.metagenomics.baseURL}/study/list)
17                def redirectURL = "${ConfigurationHolder.config.gscf.baseURL}/logout/remote?consumer=${ConfigurationHolder.config.metagenomics.ConsumerID}&token=${session.sessionToken}"
18                log.info("Redirecting to: ${redirectURL}")
19               
20                redirect(url: redirectURL)
21                return false
22        }
23}
Note: See TracBrowser for help on using the repository browser.