HttpServletRequest getRemoteUser()

View: New views
2 Messages — Rating Filter:   Alert me  

HttpServletRequest getRemoteUser()

by AnthonyW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I am using 1.1-M7...  I have a Servlet Filter that performs
Authentication.  As far the other layers are concerned, they can
assume that HttpServletRequest.getRemoteUser() returns a valid,
authenticated user.

Alas, I can't seem to figure out how to access this from Scala:
I need:  http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getRemoteUser()

S.servletRequest has been replaced with S.containerRequest, but I
don't seem to have a way to navigate to the corresponding
HttpServletRequest to get the Remote User...  Help!  Please!  Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: HttpServletRequest getRemoteUser()

by Marius Danciu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Try this:

S.containerRequest.map(r => (r.asInstanceOf[HTTPRequestServlet]).req)

req is an HttpServletRequest when you run into a JEE web container.


Br's,
Marius

On Nov 7, 5:51 am, aw <anth...@...> wrote:

> I am using 1.1-M7...  I have a Servlet Filter that performs
> Authentication.  As far the other layers are concerned, they can
> assume that HttpServletRequest.getRemoteUser() returns a valid,
> authenticated user.
>
> Alas, I can't seem to figure out how to access this from Scala:
> I need:  http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletR...()
>
> S.servletRequest has been replaced with S.containerRequest, but I
> don't seem to have a way to navigate to the corresponding
> HttpServletRequest to get the Remote User...  Help!  Please!  Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---