validate

fun validate(
    body: suspend ApplicationCall.(UserPasswordCredential) -> Principal?
): Unit

Sets a validation function that will check given UserPasswordCredential instance and return Principal, or null if credential does not correspond to an authenticated principal