Angular 9 and CAS authentication?

1,002 views
Skip to first unread message

Lakshmi

unread,
Apr 9, 2021, 5:26:59 PM4/9/21
to CAS Community
Hello All, 
I am new to CAS, my client using CAS as global authentication. I developed and Standalone application(front end angular +backend application spring boot) and I want to integrate it into one of my portals.
now my requirement is when the user coming to my application how we can get user details(session or tickets ) from cas server to my angular application. and that how can I validate across my spring boot application. I am a bit stuck at this point. please guide me on this. 

Ray Bon

unread,
Apr 9, 2021, 5:44:22 PM4/9/21
to cas-...@apereo.org
Lakshmi,

What role is the portal playing in supporting your application?

If the user is logging in to the portal, the portal can proxy to the spring boot application, https://apereo.github.io/cas/6.3.x/installation/Configuring-Proxy-Authentication.html.


Ray

On Fri, 2021-04-09 at 14:26 -0700, Lakshmi wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Hello All, 
I am new to CAS, my client using CAS as global authentication. I developed and Standalone application(front end angular +backend application spring boot) and I want to integrate it into one of my portals.
now my requirement is when the user coming to my application how we can get user details(session or tickets ) from cas server to my angular application. and that how can I validate across my spring boot application. I am a bit stuck at this point. please guide me on this. 

-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

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.

Lakshmi

unread,
Apr 9, 2021, 5:58:45 PM4/9/21
to CAS Community, Ray Bon
Hello Ray, 

Thanks for your response, 
Regarding your question, 

nope, it not supporting My application it was,  we hook links in this portal. 

Jérôme Rautureau

unread,
Apr 10, 2021, 2:54:20 AM4/10/21
to cas-...@apereo.org, Ray Bon
Hello 

I have the same requirements here with  some vuejs spa applications and spring boot 2.3 hateOAS APIs.

We are using proxy authentication with a liferay J2ee portal and it's working but it is a bit complicated to maintain.

We recently move to jwt tickets and sharing the signin key between CAS and sprinboot app. With a bit of session storage et some configuration around CORs and our XHR client AXIOS it's working fluently now.

Good luck.

--
- 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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/4e6ff61f-842b-4a54-acef-5c407dc6feb3n%40apereo.org.
Message has been deleted

Lakshmi

unread,
Apr 10, 2021, 6:30:55 PM4/10/21
to CAS Community, jrautureau, Ray Bon
hello Rautureau,
 I am new to this subject, and can you guide me on how you implemented proxy authentication because we are also using the Liferay portal, for short I am using this, could please provide more details on that. 

We are using proxy authentication with a Liferay J2ee portal and it's working but it is a bit complicated to maintain.

Jérôme Rautureau

unread,
Apr 11, 2021, 6:05:16 AM4/11/21
to Lakshmi, CAS Community, Ray Bon
Hello,

You have to rewrite the out-of-the-box CAS integration from Liferay. Because it does not support "completely" the Proxy Ticket Authentication mechanism. 

Plus we are in a clustered environment (CAS and Liferay) so it's more complicated to get it work...

Maybe I could open a gitbub repo in order to push the code.

we used the ext mechanism of Liferay (6.2 version) and changed the outdated cas-client version of the WEB-INF lib directory. 

In a portlet app, we have a getProxyTicketFor(String service) method (witch comes along the  AssertionHolder  : https://github.com/apereo/java-cas-client/blob/master/cas-client-core/src/main/java/org/jasig/cas/client/util/AssertionHolder.java) that we can push to the spring boot app service (kakawait cas spring security integration). 

In production, we have 2 kind of tickets repository, jpa and mongodb, i strongly recommend you to use mongodb over jpa.

i will prepare a repo to push the ext-impl cas-filter for Liferay.


--
Jérôme Rautureau

abdessamad kech

unread,
Jan 27, 2025, 9:32:03 AM1/27/25
to CAS Community, Jérôme Rautureau, CAS Community, Ray Bon, Lakshmi
Hi,
I am working on an application with Spring Boot as a service provider and Angular as a consumer. Could someone guide me in configuring with security and allowing access to APIs from the angular app? I already tried but can't get data from the backend app using the angular HTTP client. 
I want to know how to configure angular to be able to consume spring boot APIs that are protected with CAS. 

- CAS 6.6. 
- angular 18.
Best regards
Reply all
Reply to author
Forward
0 new messages