Hi Shavim,
I didn't use 5.2.4 so the names may be different. I've never used keycloak
either, but maybe there is a way to change what value is released there
instead of a CAS workaround.
A CAS workaround is to change the casGenericSuccessView.html file. You'll
need to obtain the default casGenericSuccessView.html file, if you built
CAS from one of the overlays you should be able to obtain the template by a
built-in gradle or maven task I believe. I use gradle with the explodeWar
task, then grab the view from
./build/cas-resources/templates/casGenericSuccessView.html and move it to
./src/main/resources/templates/ so any changes made will be applied on the
next build.
Then change this line:
<p th:utext="#{screen.success.success(${authentication.principal.id})}">You,
<strong>username</strong>, have successfully logged into the Central
Authentication Service.
to
<p th:utext="#{screen.success.success(${authentication.principal.attributes.
user_name})}">You, <strong>username</strong>, have successfully logged into
the Central Authentication Service.
Or whatever your attribute is called when returned by keycloak.
and run "./gradlew clean build" or maven equivalent to rebuild the cas.war
file.
On Monday, June 7, 2021 at 6:30:05 AM UTC-4 [email protected] wrote:
> Hi,
>
> I have integrated CAS 5.2.4 with Keycloak as Delegate Authentication. When
> the user logins successfully the following message is displayed -
> "You, 7e2b774f-4586-4bd3-99aa-35c351edaebe have successfully logged into
> the Central Authentication Service."
>
> This number is the user_id returned from Keycloak.
> I want to return *user_name* in place of *user_id*.
>
> Can someone please guide me?
>
> Thanks,
> Shivam
>
--
- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/606de231-529d-41bb-99ac-b63b033625c5n%40apereo.org.