NRaf
NRaf

Reputation: 7549

Setting up session using CAS

I'm working on integrating CAS in a legacy Java application. It's looking promising at the moment but I'm a bit confused as to where to handle the 'on-login' logic. The app relies on certain session variables being set when the user logs in. How can I handle this in my application?

i.e. User A has logs into client app A and decides he wants to do something in client B.

Since he's authenticated in client A, he is automatically authenticated and logged into client B. Since he wasn't logged into client B before (i.e. this is a new session) some house-keeping tasks need to take place. I'm a bit confused as to how and where I can take care of these tasks?

Upvotes: 1

Views: 311

Answers (2)

NRaf
NRaf

Reputation: 7549

The way to do this (or at the least the way I approached it) would be within a filter that is run after the CAS has completed.

Upvotes: 0

emilecantin
emilecantin

Reputation: 396

I may be mistaken, but our University uses CAS, and I think I understand a bit how it works.

Your legacy app will need to redirect the user to the CAS authentication, and the CAS will then automatically return the user to your application (as he is already authenticated), along with his token...

You can make this happen instead of the old login page of your app.

Upvotes: 1

Related Questions