Hi Ray,

Our production environment uses Java 8, while CAS 7.1 requires Java 21. I 
tried using CAS 6 with Java 17, but I encountered build errors.
I think the main challenge is configuring Angular to consume CAS service 
APIs and manage the login page and redirection effectively. Angular does 
not need to interact directly with the CAS server, as Spring Security on 
the CAS server handles this flow.

the problem I have is when I call the spring boot app (CAS SERVICE) API 
from Angular  I get the CAS login page HTML as an API response instead of 
redirecting me to it in the browser. 

If you have any suggestions or insights on how to resolve these issues, I 
would greatly appreciate it!
Best regards

Le mercredi 22 janvier 2025 à 19:56:02 UTC+1, Ray Bon a écrit :

> abdessamad,
>
> I suggest you upgrade to the latest cas version, 7.1.x
> It  sounds like your Angular client needs to interact with the Spring Boot 
> service with the proxy protocol; see protocol flow 
> https://apereo.github.io/cas/7.1.x/protocol/CAS-Protocol.html#proxy-webflow-diagram
> and config 
> https://apereo.github.io/cas/7.1.x/authentication/Configuring-Proxy-Authentication.html
>
>
> Ray
>
> On Tue, 2025-01-21 at 17:24 -0800, abdessamad kech wrote:
>
> You don't often get email from abdessam...@gmail.com. Learn why this is 
> important <https://aka.ms/LearnAboutSenderIdentification> 
>
> Hi, 
>
> I set up CAS server 5.3 and configured a Spring Boot Cas service with 
> Spring Security to delegate authentication to CAS. It is working fine. When 
> I try to call an API (GET, for example) from the browser, I get redirected 
> to the CAS login page. After the authentication validation, the resource or 
> API response is displayed in the browser as a JSON.
>
> However, I am facing an issue when trying to call the Spring Boot CAS 
> service APIs from my Angular client (version 17). When I make the first API 
> call from the Angular app, I am not authenticated, so I get the CAS login 
> page as the API response. To handle this, I redirect the user to the CAS 
> login page from the Angular app. Another problem arises after 
> authentication: instead of returning the API response to the Angular app 
> and setting the necessary cookies, the API response is displayed directly 
> in the browser.
>
> I have been stuck on this issue for over a week and would greatly 
> appreciate any guidance or suggestions to resolve it.
> Thank you in advance for your help!
>
>

-- 
- Website: https://apereo.github.io/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 visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/164e584f-1fd7-485a-85cf-632c14f649d8n%40apereo.org.

Reply via email to