Up until this point, we have been authenticating with CAS by obtaining the roles from our InMemoryUserDetailsManager object. However, we can create the UserDetails object from the CAS assertion just as we did with OAuth2. The first step is to configure the CAS server to return the additional attributes.
Getting the UserDetails object from a CAS assertion
Returning LDAP attributes in the CAS response
We know that CAS can return the username in the CAS response, but it can also return arbitrary attributes in the CAS response. Let's see how we can update the CAS server to return additional attributes. Again, all of the changes in this section are in the CAS server and not in the calendar application.
...