Hi Ray,
Sorry for not having replied earlie, I'm a bit ashamed :( (I was working on other topics, but still my fault I was asking the question in the first place)
The use case for having this regex is that I'm using the same client for multiple applications.
Hence:
- so atm, I have a serviceId like
- I'd have liked to use a similar logoutUrl
And I'm using OIDC implicit flow and the OIDC front end logout mechanism for all this - hence my client is a front end app.
And when my client initiated a OIDC logout request, the client app could do something like this URL:
That is the OIDC client can send a particular logoutUrl.
CAS can then check that this particular URL is one of the registered logoutUrls and can then redirect back to this particular Url.
Looking at the current implementation in CAS, I see that 2 CAS components are involved in the logout process: OidcLogoutEndpointController and LogoutAction.
And LogoutAction is being used by SAML, CAS and OIDC protocols.
Hence not so easy to fit the logoutUrl as a feature without impacting the other protocols.
From what I see in the code, OidcLogoutEndpointController retrieves the asked logoutUrl from post_logout_redirect_uri and checks that it correspond one of the logoutUrl of the registered client (it uses id_token_hint to retrieve the client).
It then propagates the asked logoutUrl as the 'service' parameter to LogoutAction.
LogoutAction uses this parameter as serviceId to retrieve check that the client is registered (btw, it implied that the logoutUrl matches the serviceId - I don't get the rationale).
If it matches, then it redirects to the asked logoutUrl.
btw, using the debugger I see that needFrontSlo=false in the LogoutAction (I would have expected it to be true since my client is a front end).
So all in all, I don't see an elegant way to implement this corner case feature atm :(
Thanks,
Adrian