Actually, you can, but it requires some customization work, not to
mention some Spring knowledge.
Here's what we do:
1. Write a Spring action (the "principal extractor") which does the
following:
* Gets the TGT ID out of the RequestContext using
WebUtils.getTicketGrantingTicketId()
* Gets the corresponding TicketGrantingTicket object from the
TicketRegistry.
* Gets an Authentication object from the TicketGrantingTicket
* Gets the Principal from the Authentication
* Put the username (or any other information you need from the
Principal) into the HttpServletRequest.
2. Add the wiring stuff for this action to wherever you put your
Spring configuration. I use a separate file under
WEB-INF/spring-configuration for all my custom actions to avoid
stomping on upstream conf files.
3. Change login-webflow.xml to insert the principal extractor action
between a successful "submit" action and "viewGenericLoginSuccess".
4. Add code to fish the username out of the request to
casGenericSuccess.jsp.
Good luck,
Rich
On 10/19/2010 12:55 PM, Scott Battaglia wrote:
> The really short answer is "no". :-) The longer answer is its
> because the API merely returns an identifier to the ticket and not the
> ticket itself.
>
> In 3.5, we're changing the API, so this should actually end up being
> better supported.
>
> Cheers,
> Scott
>
>
>
> On Tue, Oct 19, 2010 at 12:30 PM, bill kent <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hello,
>
> Is there a way to easily retrieve the username on the
> casGenericSuccess.jsp?
>
> Thank you,
> Bill
>
--
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