*UPDATE*

After digging into this further, with debugging and increased log levels, 
it appears that the method is actually getting hit and issuing the update 
command to the DB. However, the update is immediately rolled back so the 
database status is unchanged.
This is the new log message that comes from trying to update the database:
cas_1                | 2019-11-26 20:13:07,143 DEBUG 
[com.zaxxer.hikari.pool.ProxyConnection] - <HikariPool-2 - Executed 
rollback on connection org.postgresql.jdbc.PgConnection@cb7f7de due to 
dirty commit state on close().>

If I manually add a commit to the SQL then it does in fact persist the 
update in the database. I'm looking into what's causing the dirty state and 
rollback.


On Monday, November 25, 2019 at 5:27:41 PM UTC-8, Andy Ng wrote:
>
> Hi Bobby,
>
> > the *postAuthenticate() *method does not seem to be getting called at 
> all
> How did you verified that postAuthenticate does not get called? Did you 
> use some logs or you just try executing some post JDBC query and they 
> didn't get called?
>
> Have you used the keyword *@Override* to make sure your function did 
> override the parent function?
>
> Also, mind if you share your custom authentication handler with us (only 
> the part that are related is ok)?
>
> I haven't used the postAuthenticate() function myself before, but looking 
> at the source code it seems very likely that postAuthenticate should be 
> called when authenticate happens...
>
> See that there are one of the Official AuthenticationHandler (i.e. 
> TokenAuthenticaiontHandler) uses postAuthenticate here, didn't seems:
> > 
> https://github.com/apereo/cas/blob/v6.1.2/support/cas-server-support-token-authentication/src/main/java/org/apereo/cas/token/authentication/TokenAuthenticationHandler.java#L71
>
> Also, postAuthentate logic is here:
> > 
> https://github.com/apereo/cas/blob/v6.1.2/core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/handler/support/AbstractPreAndPostProcessingAuthenticationHandler.java#L43
>
> See if the above helps!
>
> Cheers!
> - Andy
>

-- 
- 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/4b5b0984-e8ac-4767-b04a-a468d1ba0a62%40apereo.org.

Reply via email to