Hi all!
Background:
When the compileJava task is run it fails and I get this error (its the first of many “does not exist" errors)
"error: package org.apereo.cas.authentication.credential does not exist”
when compiling a modified QueryAndEncodeDatabaseAuthenticationHandler.java file.
which is derived from:
support/cas-server-support-jdbc-authentication/src/main/java/org/apereo/cas/adaptors/jdbc/QueryAndEncodeDatabaseAuthenticationHandler.java
in the apereo/cas git repo.
I have a slightly different hashing method that doesn’t allow me to match the password correctly. It’s really unfortunate, because its a two line change.
here is the relevant import statements and I have located the file in
src/main/java/edu/xx/common/cas directory under the main template directory.
import org.apereo.cas.authentication.AuthenticationHandlerExecutionResult;
import org.apereo.cas.authentication.PreventedException;
import org.apereo.cas.authentication.credential.UsernamePasswordCredential;
import org.apereo.cas.authentication.exceptions.AccountDisabledException;
import org.apereo.cas.authentication.exceptions.AccountPasswordMustChangeException;
import org.apereo.cas.authentication.principal.PrincipalFactory;
I am following this pages (sparse) directions:
I agree with author that this should be trivial but it won’t compile.
Problem 1:
I don’t know the correct entries to put in the build file, nor the correct location.
I have tried a couple of different values that if I showed you would make the cas even more clear I don’t know what I am doing.
But what the heck:
classpath "org.apereo.cas:cas-server-core-authentication:${project.'cas.version'}"
classpath "org.apereo.cas:cas-server-core-services:${project.'cas.version'}"
under the “buildscript” dependencies. I have also put them under the main dependencies section, changing the “directive” to compile.
Question 1:
How do I tell the compileJava task how to find these imports?
Question 2:
Also, if I do successfully compile do I have to create another class that registers this handler and all the joy that entails or Is there a way I can specify this class (like we could in the old days of CAS, before overlays) in the config like:
cas.authn.jdbc.encode[0].handler= edu.xx.common.cas.QueryAndEncodeDatabaseAuthenticationHandler
Thanks,
Tom