[NEWSENDER] - Re: User information - Message is from an unknownsender
Stuart Smiley
ssmiley at dunbarconsulting.org
Thu Feb 14 15:05:00 EST 2008
Wilson,
I just used the instructions on this page to configure a client yesterday. They are OK but hard to find
http://www.ja-sig.org/wiki/display/CASC/CAS+Client+for+Java+3.1
Stuart
----- Original Message -----
From: Wilson França
To: Yale CAS mailing list
Sent: Thursday, February 14, 2008 2:57 PM
Subject: Re: [NEWSENDER] - Re: User information - Message is from an unknownsender
In my CAS client... What is the filter that enables setting the principal?
my web.xml:
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>
org.jasig.cas.client.authentication.AuthenticationFilter
</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>
https://mylocalhost.com:8443/cas/login
</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<filter-class>
org.jasig.cas.client.util.HttpServletRequestWrapperFilter
</filter-class>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>
org.jasig.cas.client.validation.Cas10TicketValidationFilter
</filter-class>
<init-param>
<param-name>casUrlServerPrefix</param-name>
<param-value>
http://mylocalhost.com:8080/cas
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
thanks
Wilson
On Thu, Feb 14, 2008 at 4:37 PM, Scott Battaglia <scott.battaglia at gmail.com> wrote:
Your principal where? On the server? On your CAS client? Are you using the filter that enables setting the principal?
On Thu, Feb 14, 2008 at 12:44 PM, Wilson França <wilsonrf at gmail.com> wrote:
My Principal is null.
Why?
Wilson
On Thu, Feb 14, 2008 at 9:50 AM, Wilson França <wilsonrf at gmail.com> wrote:
Thanks Scott.
Where i can read about cutomizing the CAS 2.0 response?
Wilson
On Thu, Feb 14, 2008 at 1:33 AM, Scott Battaglia <scott.battaglia at gmail.com> wrote:
If you use the SAML 1.1 protocol (or customize the CAS 2.0 response) and combine it with PersonDirectory you can return arbitrary attributes via the chosen protocol.
-Scott
On Feb 13, 2008 10:25 PM, Ole Ersoy <ole.ersoy at gmail.com> wrote:
Li,
(Guys I'm still getting started with CAS, so if anything looks off, please correct it)
As far as I know CAS will only populate the Principal's name (Stored in the session).
But once you have that you should be able to query an LDAP directory or rdbms using it as a query parameter to fetch the row or ldap entry containing the rest of the user information.
CAS populates the principal user name attribute after the user has authenticated and has a ticket granting cookie, so the user name will always be available on the principal.
Cheers,
- Ole
Li Wei Nan wrote:
> Besides user loginname, can I get any additional information about user?
>
> It's seems CAS can manage and populate principal's attribute. Is it
> stored in session or there's a CAS protocol to fetch it?
>
> In WIKI there's a config sample with LDAP, but ours is JDBC. And it says
> "Attributes are controlled by the _JA-SIG Person Directory project"
> <http://developer.ja-sig.org/projects/person-directory/>_
>
> Does that mean I must use this project to fetch user attributes?
>
>
> Thanks,
> - Li Wei Nan
>
>
>
>
>
> Le 2008-2-14 à ??7:27, Wilson França a écrit :
>
>> Thanx!
>>
>> On Feb 13, 2008 5:39 PM, Ole Ersoy <ole.ersoy at gmail.com
>> <mailto:ole.ersoy at gmail.com>> wrote:
>>
>> I think you want this:
>>
>> HttpServletRequest.getUserPrincipal()
>>
>> This returns:
>> java.security.Principal
>>
>>
>> Now call
>> java.security.Principal.getName()
>>
>> to get the name of Principal (User that logged in).
>>
>> Cheers,
>> - Ole
>>
>>
>>
>>
>> Wilson França wrote:
>> > Hi,
>> >
>> > Can i get information about the user after login is successfull?
>> >
>> > if yes, how?
>> >
>> > Thanx
>> >
>> > Wilson
>> >
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Yale CAS mailing list
>> > cas at tp.its.yale.edu <mailto:cas at tp.its.yale.edu>
>> > http://tp.its.yale.edu/mailman/listinfo/cas
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu <mailto:cas at tp.its.yale.edu>
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu <mailto:cas at tp.its.yale.edu>
>> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
_______________________________________________
Yale CAS mailing list
cas at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas
--
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
_______________________________________________
Yale CAS mailing list
cas at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas
_______________________________________________
Yale CAS mailing list
cas at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas
--
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
_______________________________________________
Yale CAS mailing list
cas at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas
------------------------------------------------------------------------------
_______________________________________________
Yale CAS mailing list
cas at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080214/9bbd3951/attachment.html
More information about the cas
mailing list