in src/main/java/org/apache/sling/auth/form/impl/jaas/FormLoginModule.java [67:88]
public boolean login() throws LoginException {
boolean succeeded = false;
Credentials credentials = getCredentials();
if (credentials instanceof FormCredentials) {
FormCredentials cred = (FormCredentials) credentials;
userId = cred.getUserId();
if (!authHandler.isValid(cred)){
log.debug("Invalid credentials");
} else if (userId == null) {
log.debug("Could not extract userId/credentials");
} else {
// we just set the login name and rely on the following login modules to populate the subject
sharedState.put(SHARED_KEY_PRE_AUTH_LOGIN, new PreAuthenticatedLogin(userId));
sharedState.put(SHARED_KEY_CREDENTIALS, new SimpleCredentials(userId, EMPTY_PWD));
sharedState.put(SHARED_KEY_LOGIN_NAME, userId);
log.debug("login succeeded with trusted user: {}", userId);
}
}
return succeeded;
}