Hi,

I think this *could* be achieved by defining "email" and "sms" attributes 
dynamically, while always leaving one of them empty, provided I got the 
somewhat brief documentation right.

By "dynamically", I mean using the Attribute Definitions 
<https://apereo.github.io/cas/6.2.x/integration/Attribute-Definitions.html> 
functionality via which one can define "inferred" attributes - e. g. via 
Groovy scripts (see examples on the linked page), while conditionally 
returning an empty value for one of the attributes. BUT this seems like a 
problematic part of this solution - *according to the linked page, there is 
no way how to get to any user attribute in the scripts* - I wonder how to 
workaround this.

Once computed as described above, the inferred attributes can be hopefully 
referenced from the corresponding ${configurationKey}.mail.attribute-name and 
${configurationKey}.sms.attribute-name properties of given providers (as 
listed in the documentation 
<https://apereo.github.io/cas/6.2.x/configuration/Configuration-Properties-Common.html#email-notifications>
).

Suggestions, anybody? Can't it be achieved in a simpler way?

On Tuesday, 15 September 2020 at 16:28:36 UTC+2 denizg wrote:

> Hello,
>
> I have configured mfa-simple, and it works both sms method and e-mail 
> method. 
>
> is there any way to select sms or email method based on principal 
> atrribute?
>
> cas.authn.accept.users=xx:yy
> cas.authn.attributeRepository.stub.attributes.home=*a*
>
>
> for example, if "home" attribute is equal to "a", then select *sms*. if not, 
> the select *email*.
>
>
> thanks.
>
> (ps: i am using 6.2.0 cas overlay template)
>
>

-- 
- 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/bd273cef-4ab4-4ee1-92d5-595941699b0en%40apereo.org.

Reply via email to