What is needed for logging in to a custom user storage?

UserModel declares SubjectCredentialManager credentialManager(). But there is also the interface CredentialInputValidator. What do I need for logging in?