This is slimmed down using the groovy script trigger, 
cas.authn.mfa.groovy-script.location 
from here, 
https://apereo.github.io/cas/6.6.x/mfa/Configuring-Multifactor-Authentication-Triggers-Groovy.html
 
. I left in the bits pertaining basically to your case, gets the clients ip 
address and compares against a cidr list using springs IpAddressMatcher 
function. There is a little more in it, we also modified the groovy trigger 
to accept an array, and not just mfa-composite. If you want to see the 
change, its a single file change, easy. Just need to get it better and 
submit pull request.



On Friday, July 21, 2023 at 1:58:27 AM UTC-5 [email protected] wrote:

> Hi,
> I would like to implement some conditional MFA scenarios (using a 
> different provider depending on the network is the first one), but reading 
> https://apereo.github.io/cas/6.6.x/mfa/Configuring-Multifactor-Authentication-Triggers-Custom.html
>  
> does not provide a lot of help.
> Is there some code snippet available somewhere I could use as an example ?
> Regards
>
> ------------------------------
> FreeMail powered by mail.fr 

-- 
- 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/aefaeec6-6f7c-444f-9575-d22dd50f8121n%40apereo.org.

Attachment: mfa_trigger.groovy
Description: Binary data

Reply via email to