Package ch.astorm.smtp4j.store
Interface UserAuthenticator
public interface UserAuthenticator
Handles the authentication of users.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckChallenge(String username, String responseChallenge, Function<byte[], String> hashFunc) Checks if the givenresponseChallengematches the expected value returned by thehashFuncaccording to theusername's password.voidcheckCredentials(jakarta.mail.PasswordAuthentication credentials) Checks the givencredentialsand throws aSecurityExceptionif those are invalid.
-
Method Details
-
checkCredentials
Checks the givencredentialsand throws aSecurityExceptionif those are invalid.- Throws:
SecurityException
-
checkChallenge
void checkChallenge(String username, String responseChallenge, Function<byte[], String> hashFunc) throws SecurityExceptionChecks if the givenresponseChallengematches the expected value returned by thehashFuncaccording to theusername's password.- Throws:
SecurityException- See Also:
-