in src/main/java/org/apache/sling/auth/saml2/sp/Saml2LoginModule.java [76:90]
public boolean login() throws LoginException {
Credentials credentials = getCredentials();
if (credentials instanceof Saml2Credentials) {
final String userId = ((Saml2Credentials) credentials).getUserId();
if (userId == null) {
logger.warn("Could not extract userId from credentials");
} else {
sharedState.put(SHARED_KEY_PRE_AUTH_LOGIN, new PreAuthenticatedLogin(userId));
sharedState.put(SHARED_KEY_CREDENTIALS, new SimpleCredentials(userId, new char[0]));
sharedState.put(SHARED_KEY_LOGIN_NAME, userId);
logger.debug("Adding pre-authenticated login user '{}' to shared state.", userId);
}
}
return false;
}