[CST-6152] Password add operation refactoring to include challenge in the value

This commit is contained in:
Luca Giamminonni
2022-08-03 17:09:09 +02:00
parent edfa9145e7
commit bfb0736ab7
20 changed files with 158 additions and 213 deletions

View File

@@ -209,12 +209,14 @@ public class AuthenticationServiceImpl implements AuthenticationService {
}
@Override
public boolean canChangePassword(Context context, String challenge) {
public boolean canChangePassword(Context context, EPerson ePerson, String challenge) {
for (AuthenticationMethod method : getAuthenticationMethodStack()) {
if (method.canChangePassword(context, challenge)) {
return true;
if (method.getName().equals(context.getAuthenticationMethod())) {
return method.canChangePassword(context, ePerson, challenge);
}
}
return false;
}
}