I'm looking at ways to integrate ProfoundUI applications into our existing internal website and I'd like to be able to share session variables, which I could deal with if I could retrieve a session cookie from within my ProfoundUI application. Is there a way to do this? I've tried retrieving HTTP_COOKIE, but apparently my application is isolated from the CGI environment, as I'm getting *null returned from my call to getenv().
Any other ideas/options on how to do this, or is it not going to be possible?
--Bryan
Can I access session cookie from ProfoundUI app?
-
- Profound User
- Posts: 72
- Joined: Fri Oct 01, 2010 5:07 pm
- First Name: Bryan
- Last Name: Leaman
- Company Name: InVue Security
- Phone: 704-752-6513 x221
- Address 1: 15015 Lancaster Hwy
- City: Charlotte
- State / Province: North Carolina
- Zip / Postal Code: 28277
- Contact:
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: Can I access session cookie from ProfoundUI app?
One idea is to use JavaScript to retrieve the cookies.
-
- Profound User
- Posts: 72
- Joined: Fri Oct 01, 2010 5:07 pm
- First Name: Bryan
- Last Name: Leaman
- Company Name: InVue Security
- Phone: 704-752-6513 x221
- Address 1: 15015 Lancaster Hwy
- City: Charlotte
- State / Province: North Carolina
- Zip / Postal Code: 28277
- Contact:
Re: Can I access session cookie from ProfoundUI app?
I was hoping to use our existing application authorization logic, but I need to know how the user has logged in to our existing site to determine if they are authorized to run the application. I need this information "before" I put out the screen.
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Can I access session cookie from ProfoundUI app?
In order for the browser to send cookies from the existing web application to the Profound UI application, the browser will have to see the 2 applications as being from the same "site".
This means either running them from the same http server instance, or setting up the existing server to call the Profound UI session controller using ProxyPass directives in the configuration.
If not set up in either of those ways, your browser will simply not send the session cookies on the request to Profound UI and there will be no possible way to read them in the application.
If you are set up this way, there is the additional problem that the HTTP_COOKIE environment variable would only be set in the session controller (CGI) program and not available in your application's job, which is not a CGI job.
To solve this, we will be making the HTTP_COOKIE environment variable available in the application's job starting with our next release, 2.1.7.
This means either running them from the same http server instance, or setting up the existing server to call the Profound UI session controller using ProxyPass directives in the configuration.
If not set up in either of those ways, your browser will simply not send the session cookies on the request to Profound UI and there will be no possible way to read them in the application.
If you are set up this way, there is the additional problem that the HTTP_COOKIE environment variable would only be set in the session controller (CGI) program and not available in your application's job, which is not a CGI job.
To solve this, we will be making the HTTP_COOKIE environment variable available in the application's job starting with our next release, 2.1.7.
-
- Profound User
- Posts: 72
- Joined: Fri Oct 01, 2010 5:07 pm
- First Name: Bryan
- Last Name: Leaman
- Company Name: InVue Security
- Phone: 704-752-6513 x221
- Address 1: 15015 Lancaster Hwy
- City: Charlotte
- State / Province: North Carolina
- Zip / Postal Code: 28277
- Contact:
Re: Can I access session cookie from ProfoundUI app?
Excellent!To solve this, we will be making the HTTP_COOKIE environment variable available in the application's job starting with our next release, 2.1.7.
--Bryan
Who is online
Users browsing this forum: No registered users and 6 guests