Hi Dmitriy, Thank you, i am new to Groovy and was not aware of "map constructor". It is working now !
Regards. -- Sébastien BEAUDLOT Administrateur système, réseaux et téléphonie Direction Opérationnelle des Systèmes d'Information ( DOSI ) Pôle Infrastructures Université d'Avignon et des Pays de Vaucluse Tèl : 04.90.16.26.04 -- De: "Dmitriy Kopylenko" <[email protected]> À: "cas-user" <[email protected]> Envoyé: Mercredi 30 Janvier 2019 16:13:02 Objet: Re: [cas-user] AuthenticationInterrupt + Groovy + autoRedirect Hi. there are getters setters methods (generated by Lombok) for each field in there. Then, it’s Groovy, so you could use a “map constructor”, e.g. return new InterruptResponse(message: message, redirectTo: redirectTo, block: block, ssoEnabled: ssoEnabled, autoRedirect: true, autoRedirectAfterSeconds: 1) or any combination of these properties. Please note that a positive value for autoRedirectAfterSeconds property is essential. HTH, D. From: Sebastien BEAUDLOT [ mailto:[email protected] | <[email protected]> ] Reply: [email protected] [ mailto:[email protected] | <[email protected]> ] Date: January 30, 2019 at 9:53:37 AM To: cas-user [ mailto:[email protected] | <[email protected]> ] Subject: Re: [cas-user] AuthenticationInterrupt + Groovy + autoRedirect I am trying something as simple as the documentation example : import org.apereo.cas.interrupt.InterruptResponse def run(final Object... args) { def uid = args[0] def attributes = args[1] def service = args[2] def logger = args[3] def message = "Test message" def block = true def ssoEnabled = true def redirectTo = ["Redirection" : "google.com"] return new InterruptResponse(message, redirectTo, block, ssoEnabled) } But how can i add a value for autoRedirect, as it seems this variable is not allowed to be passed as an argument ? Source : [ https://github.com/apereo/cas/blob/4ba9c8b8b4195b13ca5c8f59c539b0a9e693aa1d/support/cas-server-support-interrupt-api/src/main/java/org/apereo/cas/interrupt/InterruptResponse.java | https://github.com/apereo/cas/blob/4ba9c8b8b4195b13ca5c8f59c539b0a9e693aa1d/support/cas-server-support-interrupt-api/src/main/java/org/apereo/cas/interrupt/InterruptResponse.java ] -- Sébastien BEAUDLOT Administrateur système, réseaux et téléphonie Direction Opérationnelle des Systèmes d'Information ( DOSI ) Pôle Infrastructures Université d'Avignon et des Pays de Vaucluse Tèl : 04.90.16.26.04 -- De: "Dmitriy Kopylenko" <[email protected]> À: "cas-user" <[email protected]> Envoyé: Mercredi 30 Janvier 2019 15:47:37 Objet: Re: [cas-user] AuthenticationInterrupt + Groovy + autoRedirect Hi, can you post an example of your Groovy interrupt script - how you construct and return InterrupResponse object in particular. Cheers, D. From: Sébastien B [ mailto:[email protected] | <[email protected]> ] Reply: [email protected] [ mailto:[email protected] | <[email protected]> ] Date: January 30, 2019 at 9:26:25 AM To: CAS Community [ mailto:[email protected] | <[email protected]> ] Subject: [cas-user] AuthenticationInterrupt + Groovy + autoRedirect BQ_BEGIN Hi, I want to try Authentication Interrupt with a groovy ressource. It is working well following documentation : https://apereo.github.io/cas/5.3.x/installation/Webflow-Customization-Interrupt.html#authentication-interrupt (i am on 5.3.7) but i want to configure autoRedirect and i am not able to, it seems that InterruptResponse class will not allow needed variable. Is there any way to implement autoRedirect with Groovy script ? Have a nice day :-) -- - Website: [ https://apereo.github.io/cas | https://apereo.github.io/cas ] - Gitter Chatroom: [ https://gitter.im/apereo/cas | https://gitter.im/apereo/cas ] - List Guidelines: [ https://goo.gl/1VRrw7 | https://goo.gl/1VRrw7 ] - Contributions: [ https://goo.gl/mh7qDG | 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 [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/a/apereo.org/d/msgid/cas-user/568249db-303d-4f66-9a48-b41a641b71b4%40apereo.org?utm_medium=email&utm_source=footer | https://groups.google.com/a/apereo.org/d/msgid/cas-user/568249db-303d-4f66-9a48-b41a641b71b4%40apereo.org ] . -- - Website: [ https://apereo.github.io/cas | https://apereo.github.io/cas ] - Gitter Chatroom: [ https://gitter.im/apereo/cas | https://gitter.im/apereo/cas ] - List Guidelines: [ https://goo.gl/1VRrw7 | https://goo.gl/1VRrw7 ] - Contributions: [ https://goo.gl/mh7qDG | 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 [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.5c51b909.3acb9809.37b%40unicon.net?utm_medium=email&utm_source=footer | https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.5c51b909.3acb9809.37b%40unicon.net ] . -- - Website: [ https://apereo.github.io/cas | https://apereo.github.io/cas ] - Gitter Chatroom: [ https://gitter.im/apereo/cas | https://gitter.im/apereo/cas ] - List Guidelines: [ https://goo.gl/1VRrw7 | https://goo.gl/1VRrw7 ] - Contributions: [ https://goo.gl/mh7qDG | 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 [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/a/apereo.org/d/msgid/cas-user/215631806.1161500.1548860010368.JavaMail.zimbra%40univ-avignon.fr?utm_medium=email&utm_source=footer | https://groups.google.com/a/apereo.org/d/msgid/cas-user/215631806.1161500.1548860010368.JavaMail.zimbra%40univ-avignon.fr ] . BQ_END -- - Website: [ https://apereo.github.io/cas | https://apereo.github.io/cas ] - Gitter Chatroom: [ https://gitter.im/apereo/cas | https://gitter.im/apereo/cas ] - List Guidelines: [ https://goo.gl/1VRrw7 | https://goo.gl/1VRrw7 ] - Contributions: [ https://goo.gl/mh7qDG | 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 [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.5c51befe.6b910f4.823%40unicon.net?utm_medium=email&utm_source=footer | https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.5c51befe.6b910f4.823%40unicon.net ] . -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/2087430808.1183934.1548863352761.JavaMail.zimbra%40univ-avignon.fr.
