Re: [cas-user] CAS WAR Overlay - REST APIs added in custom java class not detecting

2020-06-30 Thread Nishant Singh
Hi Ray,

Thanks a lot for your reply. Your response worked for me. I looked into the 
architecture of CAS Support Rest module and understood that you have to 
register your new controller in CasRestConfiguration.java as a bean and 
injecting all the dependencies required by the controller class.

Now i am able to add my own classes in the CAS Overlay Project by 
configuring them and also customize  the existing classes of CAS too.


Nishant Singh

On Friday, 19 June 2020 21:51:39 UTC+5:30, rbon wrote:
>
> Nishant,
>
> You will also have to add, to cas overlay, the configuration to let it 
> know how to handle your endpoint.
> Look in to how cas does its REST login, 
> https://apereo.github.io/cas/development/protocol/REST-Protocol.html. 
> This will require digging in to the cas source, 
> https://github.com/apereo/cas.
>
> Ray
>
> On Fri, 2020-06-19 at 04:52 -0700, Nishant Singh wrote:
>
> Notice: This message was sent from outside the University of Victoria 
> email system. Please be cautious with links and sensitive information. 
>
> I am working on customising *CAR WAR Overlay with version 6.1.x* and add 
> some new functionalities in the form of REST APIs. Now CAS says that in 
> order to add a custom java class we need to do the following: 
>
> *"In order to include custom Java source, it should be included under a 
> src/main/java directory in the overlay project source tree."*
>
> *So i included my java class which is a REST Controller at this location: 
> src/main/java/com/example/rest/RestController.class*
>
> *However, when I run my overlay project in intellij using the command 
> ./gradlew run and try the APIs in Postman then i get 404. Am i missing 
> something here?*
>
> *I want to do the customisation in overlay so i dont face problem whenever 
> i upgrade cas version. **This is the link where CAS explains about the 
> ability to customise is below:*
>
> https://apereo.github.io/cas/development/installation/WAR-Overlay-Installation.html#custom-and-third-party-source
>
> -- 
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 | CLE 019 | rb...@uvic.ca 
>
> I respectfully acknowledge that my place of work is located within the 
> ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
> WSÁNEĆ Nations.
>

-- 
- 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/5658eb19-b00c-4db6-829e-dfe687bbfd33o%40apereo.org.


Re: [cas-user] CAS WAR Overlay - REST APIs added in custom java class not detecting

2020-06-19 Thread Ray Bon
Nishant,

You will also have to add, to cas overlay, the configuration to let it know how 
to handle your endpoint.
Look in to how cas does its REST login, 
https://apereo.github.io/cas/development/protocol/REST-Protocol.html. This will 
require digging in to the cas source, https://github.com/apereo/cas.

Ray

On Fri, 2020-06-19 at 04:52 -0700, Nishant Singh wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

I am working on customising CAR WAR Overlay with version 6.1.x and add some new 
functionalities in the form of REST APIs. Now CAS says that in order to add a 
custom java class we need to do the following:

"In order to include custom Java source, it should be included under a 
src/main/java directory in the overlay project source tree."

So i included my java class which is a REST Controller at this location: 
src/main/java/com/example/rest/RestController.class

However, when I run my overlay project in intellij using the command ./gradlew 
run and try the APIs in Postman then i get 404. Am i missing something here?

I want to do the customisation in overlay so i dont face problem whenever i 
upgrade cas version. This is the link where CAS explains about the ability to 
customise is below:
https://apereo.github.io/cas/development/installation/WAR-Overlay-Installation.html#custom-and-third-party-source

--

Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE 019 | r...@uvic.ca

I respectfully acknowledge that my place of work is located within the 
ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
WSÁNEĆ Nations.

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