Here’s some code I used.
HttpServletRequest request = ((HttpServletRequest)
getRequest().getContainerRequest());
log.info(request.getRemoteUser());
CasAuthenticationToken cat =
(CasAuthenticationToken)request.getUserPrincipal();
Map<?, ?> attributeMap =
cat.getAssertion().getPrincipal().getAttributes();
From: jeremie_se [mailto:[email protected]]
Sent: Saturday, 11 January 2014 8:36 a.m.
To: [email protected]
Subject: [cas-user] How to retrieve CAS user name in Apache Wicket
Hello,
I am working on a research project for a university, and I must build a
portal-like web application where they see analysis information about their
academic performances.
My web application is built using the Apache Wicket framework.
I need to use the university's CAS authentication server and use its login page
to validate the user credentials. However, I also want to retrieve the name the
user entered as username, as I need it for storage in session variables and use
for the duration of the session.
I saw that CAS has a client for Apache Wicket, but I can't see how I can
retrieve the username.
Any help would be appreciated,
Jeremie
--
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
--
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