Amulya,

Are you sure you need to have a custom captcha (or any other custom code)?
If you do create something custom, try to make it in such a way that it can be 
added to the main cas project (hopefully you will have time to do so - which I 
seem to lack).
See https://apereo.github.io/cas/developer/Contributor-Guidelines.html

<https://fawnoos.com>https://fawnoos.com/blog/ is a good place to start. You 
will also need to understand various spring libraries.

Take a look at the existing reCaptcha 
https://apereo.github.io/cas/7.0.x/integration/Configuring-Google-reCAPTCHA.html
 and how it is implemented, how it fits into [spring] web flow, gets properties 
etc. You may be able to extend those classes.

Ray

On Mon, 2024-02-05 at 21:38 +0530, Amulya Sri Pulijala wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Thanks!

Yeah.. am trying to add captcha, username, password etc in a single handler. 
Any pointers to such tutorials?

Amulya

On Mon, Feb 5, 2024 at 7:58 PM Ray Bon <r...@uvic.ca<mailto:r...@uvic.ca>> 
wrote:
Amulya,

To add 'customHandlers' you would need to modify the class that handles authn 
properties (cas.authn).
To see how the chain of properties works in cas, start with the main class,
https://github.com/apereo/cas/blob/v7.0.0/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/CasConfigurationProperties.java

Search this file for 'authn' which is a class member pointing to 
AuthenticationProperties

I do not suggest modifying AuthenticationProperties.
You can create your own properties file (maybe CustomProperties) which could 
have a member variable authn pointing to CustomAuthenticationProperties. Given 
CustomAuthenticationProperties extends AuthenticationProperties, your property 
would then be

cusom.authn.jdbc.bind[0].password=test@123<mailto:.password=test@123>

i.e. leverage the properties of existing classes.

Authentication can be a complex process.
Cas is very modular. Small parts are assembled to meet the complexity.

Are trying to make a single handler to process; username, password, captcha, ui 
widgets, etc?
Many cas features have the capability to add groovy scripts. Perhaps some of 
your custom features can be met with builtin features + groovy.

Take a look at post authentication processing too, 
https://apereo.github.io/cas/7.0.x/authentication/Configuring-Authentication-PrePostProcessing.html

Ray

On Sat, 2024-02-03 at 08:03 -0800, Amulya Sri Pulijala wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Thanks!

I could create login page; handler and configure as well.
I added it in both applications.yml and spring.factories as well.

My cas.properties is as follows:
cas.authn.accept.enabled=false
cas.authn.handler.names=customAuthenticationHandler
cas.authn.customHandlers.customAuthenticationHandler.name<http://cas.authn.customHandlers.customAuthenticationHandler.name>=customAuthenticationHandler
cas.authn.customHandlers.customAuthenticationHandler.type=com.example.authentication.CustomAuthenticationHandler
cas.authn.customHandlers.customAuthenticationHandler.url=jdbc:postgresql://localhost:5432/cas
cas.authn.customHandlers.customAuthenticationHandler.username=postgres
cas.authn.customHandlers.customAuthenticationHandler.password=test@123
cas.authn.customHandlers.customAuthenticationHandler.sql=SELECT * FROM users 
WHERE username = ? AND password = ?
cas.authn.customHandlers.customAuthenticationHandler.order=1


Am facing the issue that login is not going to the custom handler. I could see 
that respective classes are generated at the correct location also.

Thanks in advance! Kindly share your thoughts/inputs.

Amulya
On Saturday, February 3, 2024 at 8:27:11 AM UTC+5:30 Ray Bon wrote:
Amulya,

You can copy what is done for the default login form.
I thought there was some guidance in the docs, but I am unable to find it. You 
can use spring tutorials.

Ray

On Thu, 2024-02-01 at 15:10 -0800, Amulya Sri Pulijala wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Thanks! that helped! I customized loginform.html and wrote my own handler.
Can someone point out a tutorial of how to build or how to write configuration 
for the handler?

Amulya

On Wednesday, January 31, 2024 at 7:51:33 PM UTC+5:30 Ray Bon wrote:
Amulya,

See https://fawnoos.com/2022/07/22/cas66-ui-themes/ and 
https://fawnoos.com/2023/12/15/cas70x-gettingstarted-overlay/

Ray

On Tue, 2024-01-30 at 22:01 -0800, Amulya Sri Pulijala wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Thanks a ton! This helped. I could build it in RHEL using cas-overlay-template.

I have a doubt that, Can I customize UI and add few widgets like label,  
textbox (such as mathematical expressions for captcha) etc in 
cas-overlay-template as well??
And specific functionality for them?

Regards,
Amulya



On Wednesday, January 31, 2024 at 1:51:45 AM UTC+5:30 Ray Bon wrote:
Amulya,

Are you talking about the cas project or cas-overlay-template?

Check your command (mind the '/' not '\'):
./gradlew clean build

Ray

On Tue, 2024-01-30 at 10:22 -0800, Amulya Sri Pulijala wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Hey,

Am new to Apareo CAS. I could build v 6.6 in windows using gradle . But, when 
am trying to build it in Linux RHEL, I could not see any error during build, 
however, the war generated is of 261Kb only.

And I could see that WEB-INF folder itself is missing in war file., the build 
process is same. I just cloned and ran .\gradlew clean build.
I tried stopping the gradle, cleaning it and restarting, but the output is 
ssame.

Kindly help me. Thanks in Advance!

Regards,
Amulya








-- 
- 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/bc6518b8eafa7a6b07911e4eda0dd06f470604b2.camel%40uvic.ca.

Reply via email to