Hi, Thanks for your answer. Is there any reason why it has been removed ? 
Regards   

Le 23-Aug-2023 20:18:47 +0200, jbanner6...@gmail.com a crit: 
 Were no longer on 6.x series, as in your case, we used couchdb for many items 
and it is being removed in 7.x so we went ahead and moved on and it looks as 
though it was removed on the tag for 6.6.10, maybe on accident? because it 
still exists in the 6.6.x branch. Maybe an ooops by one of the devs and tagged 
6.6.10 off wrong branch? Idk..     
  On Wednesday, August 23, 2023 at 10:53:43 AM UTC-5 spfma...@e.mail.fr wrote: 
 Hi,   I am still trying to understand what is wrong with 
"cas-server-support-gauth-couchdb" (only the first authenticator is recorded in 
the database, none is working anymore after a restart).   As I am not a Java 
dev (I don't have the skills and don't have the most convenient tools), my idea 
was to add some logging directives here and there to trace the process, using 
the latest branch of the application source code (not the overlay one).   Can 
someone confirm I am doing the right way : - add "import 
lombok.extern.slf4j.Slf4j;" if missing on the top of the class file - anotate 
the class definition with "@Slf4j" - put stuff like "LOGGER.debug" or 
"LOGGER.info" as needed   VSCode is my tool, and it seems convenient extensions 
for Java/Maven/Gradle are not able to handle a big project like CAS (language 
server crashing and restarting all the time, Gradle extensions unable to build 
a tree of all subprojects without crashing, ...) so I don't mind using the good 
old manual way instead of wasting time.   After modifying the code here and 
there, I rebuild the whole app with "./gradlew clean build --parallel 
--configure-on-demand --stacktrace --no-daemon -x checkstyleMain" at the root 
of the project.   And "cas/webapp/cas-server-webapp-jetty$ ../../gradlew 
bootRun --parallel --configure-on-demand --build-cache --stacktrace --no-daemon 
-x checkstyleMain" allows me to try it (we use it with Jetty in production).   
The app is running, I can reproduce the problems but I have the feeling my 
modifications don't exist as none of my custom logging messages is displayed.   
For an example, I added a simple logging flag in this file 
"support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java"
 this way :     @View(name = "by_username", map = "function(doc) { 
if(doc.secretKey) { emit(doc.username, doc) } }") public List 
findByUsername(final String username) { LOGGER.debug("[MY_DEBUG_STUFF] 
findByUsername@GoogleAuthenticatorAccountCouchDbRepository={}", username); try 
{ return queryView("by_username", username.trim().toLowerCase());  } catch 
(final DocumentNotFoundException e) { LOGGER.trace(e.getMessage(), e);  } 
return new ArrayList(0);  }     as I think it's the one responsible for 
database lookup, according to the request I have seen coming on database side.  
 But nothing in the logs ... Maybe I am not tagging the right source file ?   
So why not tweak a known existing log message, it is safer. In 
"support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/gauth/token/GoogleAuthenticatorCouchDbTokenRepository.java"
 I changed the message in "cleanInternal" method. The string "Removing tokens 
older than" is only found in this file, so I think it's spot on.   After 
rebuilding and restarting the application, I still get the original message in 
my logs.   DEBUG 
[org.apereo.cas.gauth.token.GoogleAuthenticatorCouchDbTokenRepository] -

-- 
- 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/ace6588e3878b26e067036a9eef684009c4993c6%40mail.de.

Reply via email to