Hi Andy,

Thanks for taking the time to look at this.
I did implement a new custom handler by extending 
*QueryDatabaseAuthenticationHandler. 
*According to the logs, the new handler is being picked up by CAS and 
successfully used. However, the *postAuthenticate() *method does not seem 
to be getting called at all. 
Do I need to make an explicit call to this method? I assumed that CAS would 
do that somewhere, as a part of its pipeline but I'm also not seeing it 
anywhere in the source code.


On Sunday, November 24, 2019 at 6:42:38 AM UTC-8, Andy Ng wrote:
>
> Hi Bobby,
>
> I have searched around the CAS 6 documentation, seems like there are 
> nothing similar to your use case build in (Althoguh it is still quite 
> possible that such feature exist but I didn't find it). I guess custom 
> implementing might be an feasible idea.
>
> If I am customizing to add last use time, instead of implements from 
> PrePostAuthenticationHandler, I think I would just extends from the 
> existing AuthenitcaiontHandler and add my postAuthentication() function 
> instead.
>
> - E.g. let say I am using JDBC, so I might be using Database Query 
> Authentication Handler (i.e. 
> https://github.com/apereo/cas/blob/v6.1.2/support/cas-server-support-jdbc-authentication/src/main/java/org/apereo/cas/adaptors/jdbc/QueryDatabaseAuthenticationHandler.java
> )
> - I would go and make an Authenticaiton Handler, 
> *extending QueryDatabaseAuthenticationHandler* itself
> - Then, add the timestamp feature in the *postAuthentication*() function
> - Afterward, make an Spring Bean overriding the config for 
> AutennticationHandler, which is here 
> https://github.com/apereo/cas/blob/v6.1.2/support/cas-server-support-jdbc/src/main/java/org/apereo/cas/adaptors/jdbc/config/CasJdbcAuthenticationConfiguration.java#L67
>
> If you do it that way, there will be no need to create your JDBC from 
> scretch, and also have your last use timestamp implemented.
>
> See if the above help...
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4d065ab7-42d0-4e56-b0c5-d3d40b6c50cf%40apereo.org.

Reply via email to