This is my scenario:
- User tries to reach ServiceA or B
- ServiceA throws an exception(user does not have sso session yet) and redirects User to Cas web form for user input credentials
- User have a choose, to enter username/password in the CAS form or click the link to reach external identity provider portal.
- If user chooses External Identity Provider (EIDP), the user will be redirected to new web page of EIDP for user credentials input. I put redirectURL after success EIDP identificaiton.
- If success identification in EIDP: user will be redirected to redirectURL (for example to serviceA, to serviceB or to my Custom Authentication Service).
The EIDP provides ticket in redirect URL to retrieve User Details later.
I need here to create new user in DB or if user exists- immediately authenticate via CAS (to create sso session and redirect to Service(A,B)). For that purpose i have created my Custom Authentication Service.
My questions is:
- How to create Cas SSO session via Custom Authentication Service? I’m using here CAS REST API. Maybe it is wrong idea
- How to separate CAS login form username/password and REST API authentication to use different CAS Authentication handlers.