[cas-dev] How can one detect the client ip address
Andrew Petro
apetro at unicon.net
Thu Jan 18 14:38:58 EST 2007
Note that the CAS 2 APIs made the ServletRequest available to authentication
handlers.
Documentation is available in the wiki on using the CAS2 APIs directly in
CAS 3:
http://www.ja-sig.org/wiki/display/CAS/Using+CAS2+PasswordHandlers+in+CAS3
Getting the IP address to the authentication handler feels a lot like
getting the REMOTE_USER header to the authentication handler, an example of
the latter is available in the wiki:
http://www.ja-sig.org/wiki/display/CAS/Using+the+REMOTE_USER
Andrew
________________________________________
From: cas-dev-bounces at tp.its.yale.edu
[mailto:cas-dev-bounces at tp.its.yale.edu] On Behalf Of Scott Battaglia
Sent: Tuesday, January 16, 2007 9:42 PM
To: Mailing list for CAS developers
Subject: Re: [cas-dev] How can one detect the client ip address
There is no easy way to access that event from an AuthenticationHandler
(other than putting it in a ThreadLocal). You can extend the
UsernamePasswordCredentials to include an HttpServletRequest object and
create a custom CredentialsBinder to inject that object into the credentials
in the AuthenticationViaForm action. This would then be available to any
handler.
-Scott
On 1/12/07, Stephen More <stephen.more at gmail.com> wrote:
Is there currently a method that will allow one to configure a generic
adaptor to an allowable set or range of specific ips ?
If not, how can one access the org.jasig.cas.event.HttpRequestEvent
from AbstractUsernamePasswordAuthenticationHandler ?
-Thanks
Steve More
_______________________________________________
cas-dev mailing list
cas-dev at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas-dev
More information about the cas-dev
mailing list