HI All, i figured out my problem! that is interesting.
this is my customized configuration public Collection<AuthenticationHandler> jdbcAuthenticationHandlers() { .... jdbc.getEncode().forEach(b -> handlers .add(queryAndEncodeDatabaseAuthenticationHandler(b))); ...... this is my cas.properties: cas.authn.jdbc.search[0]...... the code does not match properties (code expects getEncode(), but property only has jdbc.search....) I cannot figure this out because there was Not any error in logs. very interesting. Now is working as expected. Yan On Monday, January 29, 2024 at 1:49:01 PM UTC-5 Mohamed Amdouni wrote: > Hello, > > For debugging, I just download the whole cas repository. (The > corresponding tag version) then I import this project to IntelliJ and > connect to the overlay remote jvm. > It doesn’t matter if the project compile or not if you would like to just > debug. > > > Le lun. 29 janv. 2024 à 17:45, Ray Bon <rb...@uvic.ca> a écrit : > >> Yan, >> >> I have found that intellij will report errors/missing references but code >> compiles just fine. >> The build process with cas-overlay places files (compiled coded and >> resources) from src onto the prebuilt cas.war. >> I have not tried to replace jar files, so I am not sure how you would get >> those into the build (unless you added them manually after deployment - but >> that seems ineffective). >> >> If you are trying to debug your custom authenticator, you should not need >> the external jars (you could use log lines). If you are trying to fix an >> error in those external jars, you would have to work with the main cas >> project. >> >> You can increase spring logging to see how it treats your configuration >> class. >> This logger may also help >> >> <!-- outputs only during startup --> >> <AsyncLogger name="org.apereo.cas.config" level="debug" /> >> >> Did you create your authenticator from scratch (as described in >> https://fawnoos.com/2017/02/02/cas51-authn-handlers/) >> <https://fawnoos.com/2017/02/02/cas51-authn-handlers/> or did you copy >> from and existing authenticator? >> >> Ray >> >> On Mon, 2024-01-29 at 07:02 -0800, Yan Zhou wrote: >> >> Notice: This message was sent from outside the University of Victoria >> email system. Please be cautious with links and sensitive information. >> >> Hello, >> >> thank you both! But, neither helped. >> >> I have been on CAS for quite some time, making customization, but it is >> always Maven/Eclipse that I am working with, i wonder if that is because my >> lack of knowledge with Overlay's gradle build set-up. >> >> in my cas-overlay build.gradle, I placed all dependencies there, CAS >> loads correctly, it is reading Service Registry from JSON, as I placed >> dependency there. it is also generating SAML-related artifacts. >> >> But, when I added ...-support-jdbc... and >> -support-jdbc-authenitcaiton.... jars into intellij, so that I can debug >> the CAS source code (i add these as External Dependencies with Jar and >> Source Code), Intellij says they are Not used. Hmm, I wonder maybe that >> is the problem, even though it is listed, somehow they are not loaded. >> But, I am new to Gradle and to Intellij .... >> >> Yan >> >> ..... >> >> dependencies { >> /** >> * Do NOT modify the lines below or else you will risk breaking dependency >> management. >> */ >> implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${ >> project.'cas.version'}") >> implementation platform(org.springframework.boot.gradle.plugin. >> SpringBootPlugin.BOM_COORDINATES) >> >> /** >> * Do NOT modify the lines below or else you will risk breaking the build. >> */ >> implementation "org.apereo.cas:cas-server-core-api-configuration-model" >> implementation "org.apereo.cas:cas-server-webapp-init" >> >> developmentOnly "org.springframework.boot:spring-boot-devtools:${project. >> springBootVersion}" >> >> /** >> * CAS dependencies and modules may be listed here. >> * >> * There is no need to specify the version number for each dependency >> * since versions are all resolved and controlled by the dependency >> management >> * plugin via the CAS bom. >> **/ >> implementation "org.apereo.cas:cas-server-support-rest" >> implementation "org.apereo.cas:cas-server-support-saml-idp" >> implementation "org.apereo.cas:cas-server-support-pac4j-webflow" >> implementation "org.apereo.cas:cas-server-support-json-service-registry" >> implementation "org.apereo.cas:cas-server-core-webflow-api" >> implementation "org.apereo.cas:cas-server-core-api-webflow" >> implementation "org.apereo.cas:cas-server-core-web-api" >> implementation "org.apereo.cas:cas-server-support-jdbc" >> implementation "org.apereo.cas:cas-server-support-jdbc-authentication" >> implementation "org.apereo.cas:cas-server-core-api-authentication" >> implementation "org.apereo.cas:cas-server-core-authentication-api" >> implementation "org.apereo.cas:cas-server-support-jpa-util" >> implementation "org.apereo.cas:cas-server-support-oidc" >> >> if (project.hasProperty("casModules")) { >> def dependencies = project.getProperty("casModules").split(",") >> dependencies.each { >> def projectsToAdd = rootProject.subprojects.findAll {project -> >> project.name == "cas-server-core-${it}" || project.name == >> "cas-server-support-${it}" >> } >> projectsToAdd.each {implementation it} >> } >> } >> >> On Friday, January 26, 2024 at 1:44:58 PM UTC-5 Mohamed Amdouni wrote: >> >> Hi, >> >> Did you tried to add the driver dependency ? >> >> cas-server-support-jdbc-drivers >> >> >> >> >> >> Le ven. 26 janv. 2024 à 18:42, Yan Zhou <yana...@gmail.com> a écrit : >> >> Hi there, >> >> I maybe missing something obvious. >> >> I created my own JDBC-based authenticator, I noticed that the JDBC >> authentication is Not registered, so login does not load jdbc-authenticator >> at all. >> >> set breakpoint in CasJdbcAuthenticationConfiguration, it is not called >> during CAS start-up. >> >> how is this configuration being loaded, see the code below? >> >> @ConditionalOnFeatureEnabled(feature = >> CasFeatureModule.FeatureCatalog.Authentication, module ="jdbc") >> >> is this driven by the presence of cas.auth.jdbc and jdbc jars in >> dependenices? >> >> Yan >> >> Project dependencies. >> >> implementation"org.apereo.cas:cas-server-support-jdbc" >> implementation "org.apereo.cas:cas-server-support-jdbc-authentication" >> >> >> I added configuration in META-INF/spring.factories like this, i created >> my own class, so as to load my custom jdbc Authenticator. >> >> org.apereo.cas.adaptors.jdbc.config.MyCasJdbcAuthenticationConfiguration >> >> then in cas.properties, i have all the properties filled. >> >> cas.authn.jdbc.search[0]...... >> >> thanks, >> >> >> >> -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/a0fe29b0-18b5-44b1-ab30-85fadd86cb2bn%40apereo.org.