> Adding following on casGenericSuccess.jsp does not work:-
> <%= request.getParameter("username") %> <spring:message
> code="screen.success.success" />
That's because you're pulling a value from the login form directly.
If you return to that page some time after login you won't have the
posted parameter in the request. Also, the CAS _client_ sets the
REMOTE_USER HTTP; the CAS server does not do this, which explains why
request.getRemoteUser() doesn't work.
Here's a pretty straightforward outline for how to solve this problem:
1. Extract the TGT from the TGC cookie in the request
2. Query the ticket registry for the ticket object corresponding to
the TGT string
3. Display the user name (principal ID) by placing the following in
your JSP: ticketGrantingTicket.getAuthentication().getPrincipal().getId()
M
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user