Mar 1st, 2011, 11:11 AM
Solution for handling Spring security session Id in different wed apps
I have 2 web application on different wed servers: Core (Spring 3.0.5, Spring Security 3.0.5, PostgreSQL) and Red5
I need to develop the next workflow:
- User logins in Core
- System returns web page with simple html and flex app
- User streams audio on Red5 by flex app
- Red5 uses Core to check if user is logged in
- Red5 sends file to Core
- Core identifies that a file come from appropriate user
- Core stores file in related user's folder
I have configured Spring Security at Core, flex client which streams audio to Red5, servlet on Red5 which stores audio in flv file and have access to this file.
My idea is:
- In case of successful login Core returns sessionId
- At the end of recording flex app sends sessionId to Red5 server
- Red5: makes http get request with sessionId to Core
- Core returns "true" in case of user was logged in
- Red5: makes http post request with 2 parameters: file and sessionId
- Core identifies user and stores file in user's folder
Please provide mechanism how to get this sessionId, how to check if user is logged in and how to get user by this sessionId or better approach to implement described workflow
Mar 1st, 2011, 05:12 PM
If I were you I would try to stick to something a little more standard. Spring Security Extensions has support for OAuth which would seem like a better fit.
Mar 2nd, 2011, 03:48 AM
Thanks for this solution. I thought about to use oauth. But as I saw in Tonr 2 we need to add Spring Security configuration to OAuth consumer. It is not easy to do in already configured application such as Red5. Maybe you can suggest how to develop OAuth consumer without configuration Spring Security Extensions.
Mar 2nd, 2011, 08:02 AM
You might take a look at the java section of the oauth code page.
Mar 2nd, 2011, 08:59 AM
Suggested libs are for OAuth 1. What about OAuth 2 ?
Do you think that using OAuth 1 is better approach for now ? (until OAuth 2 will be finished or better supported)
Tags for this Thread