On 19/02/2018 20:36, PeeDub wrote:
How would you go about configuring Syncope to require that a user uses email
as a username? I see that there is a way to configure a password policy, but
I can't see any way to configure a password policy (other than allowing
null) in the console. In addition, I see that there is a way to annotate a
custom class with @PasswordRuleConfClass (and I'm guessing that class is in
some maven artifact I don't have by default), but is there an easier way by
chance? There is a schema validator for email, for instance. I'm wondering
if there is some setting to either require that the email and username are
identical, or maybe that they have to use the email to log in, or failing
that, perhaps I could leverage the email schema validator to validate the
username as well?

Hi,
few items:

* you are free to use e-mail addresses as values for username (I did so for several projects): only, you'd need to add an Account Policy [1] with an instance of the DefaultAccountRule bearing a validation pattern to ensure that provided values are effectively e-mail addresses

* you are free to use another plain attribute (for example, email) for authentication - see the authentication.attributes configuration parameter [2]

* Account, Password and Pull Policies [3] can aggregate zero or more rules; for each type of policy, a default implementation is provided for common usage; annotations like as @AccountRuleConfClass and @PasswordRuleConfClass can be used to provide custom rules (but this is a quite advanced topic, lacking real examples in the documentation)

* From Admin Console, once you have created an Account, Password or Pull Policy, you'll need to add some rules in order to make them effective: [4] [5] [6].

HTH
Regards.

[1] https://syncope.apache.org/docs/reference-guide.html#policies-account
[2] https://syncope.apache.org/docs/reference-guide.html#configuration-parameters
[3] https://syncope.apache.org/docs/reference-guide.html#policies
[4] https://pasteboard.co/H8tNox3.png
[5] https://pasteboard.co/H8tNLcj.png
[6] https://pasteboard.co/H8tO58p.png

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to