Reading values from http header

I am calling a service from portal which displays a document on the portal screen. But to give extra security i need to capture the current user from the session and pass it to the service.
The user name is available in the header.
Is there any way i can read the http header. I want to read the value of sm_user variable which stores the current user name.

Try using the service pub.flow:getTransportInfo in the WmPublic package to read the HTTP headers.