DatabaseAuthenticationProvider is using EmailValidator to determine if input is an email and then based on the result determines how to query the database.
We don't have a context or annotation metadata to pass to the validator and are currently passing a null. We were lucky in that an older implementation of the class wasn't using that. The newer implementation does and this is holding us back from upgrading to Micronaut 2.5 and further.
My suggestion is to use an or condition in the DB query to check for username or email. That should yield the same results and doesn't make this implementation dependent on the EmailValidator class.
DatabaseAuthenticationProvider is using EmailValidator to determine if input is an email and then based on the result determines how to query the database.
We don't have a context or annotation metadata to pass to the validator and are currently passing a null. We were lucky in that an older implementation of the class wasn't using that. The newer implementation does and this is holding us back from upgrading to Micronaut 2.5 and further.
My suggestion is to use an
orcondition in the DB query to check for username or email. That should yield the same results and doesn't make this implementation dependent on the EmailValidator class.