validate
Sets a validation function for UserPasswordCredential.
Return a principal of type P when authentication succeeds, or null when credentials are invalid.
Parameters
body
validation function called with the current routing context and credentials extracted from form parameters.