@Override
    public void process(final AuthenticationBuilder builder, final AuthenticationTransaction transaction) throws Throwable {
        val primaryCredential = (UsernamePasswordCredential) transaction.getPrimaryCredential().orElseThrow();
        if (!passwordValidationService.isAcceptedByPasswordPolicy(primaryCredential.toPassword())) {
            throw new WeakPasswordException(primaryCredential);
        }
    }
This is {@link PasswordStrengthAuthenticationPostProcessor}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-pm-core/src/main/java/org/apereo/cas/pm/PasswordStrengthAuthenticationPostProcessor.java