[keycloak-user] Username validation

Richard richie765 at gmail.com
Sat Oct 28 17:25:39 EDT 2017


I'm trying to implement validation on the username. Specifically I'd
like to validate a max length and characters that are allowed.

I've found some checks in:*RegistrationUserCreation.java and
*Validation.java. It looks like the first is used for signups, the
latter for changing the account information of existing users.

**
How should I go about adding checks?

For the Registration I'm guessing that I should copy
*RegistrationUserCreation, add the checks, and create a new Registration
Flow with the new SPI. Is this correct?

But what about the Validation for existing accounts? I could do the
same. Make my own copy of Validation.java, but how do I plug it into the
system?

Any help much appreciated!
*


More information about the keycloak-user mailing list