Authenticating using the web application session ID

S

Stanimir Stamenkov

I've wondered if it's possible... I have a HTML page which loads an
applet which is responsible for connecting to a service (other than
the web application - JSPs) on my system. I want to use the session ID
assigned by the web application to authenticate the user upon the
applet connection to avoid double logins and transmission of user name
and password, probably over a secure connection (this is already done
by the http service). The session ID is passed to the applet object
with a parameter in the generated HTML.

At this point my other service needs a way to query the web
application component for the session identified by the specified ID.
I see the 'HttpSessionContext' interface is deprecated entirely and
I've wondered how I could obtain instance and query a specific session
on the server-side from "third-party" service?

Thank you for your help in advance.
 
V

VisionSet

Stanimir Stamenkov said:
I've wondered if it's possible... I have a HTML page which loads an
applet which is responsible for connecting to a service (other than
the web application - JSPs) on my system. I want to use the session ID
assigned by the web application to authenticate the user upon the
applet connection to avoid double logins and transmission of user name
and password, probably over a secure connection (this is already done
by the http service). The session ID is passed to the applet object
with a parameter in the generated HTML.

At this point my other service needs a way to query the web
application component for the session identified by the specified ID.
I see the 'HttpSessionContext' interface is deprecated entirely and
I've wondered how I could obtain instance and query a specific session
on the server-side from "third-party" service?

Your applet can open HttpUrlConnection with servlet and request any session
data.
So I don't see that it is necessary to pass it as parameter in html if you
are going to check it anyway.
 
S

Stanimir Stamenkov

VisionSet said:
Your applet can open HttpUrlConnection with servlet and request any session
data.
So I don't see that it is necessary to pass it as parameter in html if you
are going to check it anyway.

My applet needs to authenticate itself agains my other service (which
runs in its own JVM. It uses a TCP Socket for connection with custom
protocol, not HTTP) - not against the web service/application. I don't
want double logins nor secure transmission of sensitive data
(username:password) so I want to use the authentication done already
by the web application. My other service would query the web
application through JMS call or whatever on the server-side.

I hope I made it clearer this time.
 
S

Stanimir Stamenkov

[...]
I see the 'HttpSessionContext' interface is deprecated entirely and
I've wondered how I could obtain instance and query a specific session
on the server-side from "third-party" service?

BTW I've just saw there is a 'HttpSessionListener' interface which I
could use to build a session retrieval component in the web
application, which I could query through custom mechanism from my
other service, but I couldn't see any references to it - where I could
register such listener?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top