Need help passing login information to a system .. and then going directly to a specific URL
Posted on 2004-10-12
I need help .. and am hoping that someone could help me with this.
Situation - that needs to exist. (Let me know if this makes sense and if you need any additional information to assist me.)
I have a Portal system that students can log into in order to access their financial and all other information at a Unviersity. Typically they go to a home page and then enter a username and password. Once they log in, they can then proceed and navigate through the portal. This is fine, but tends to take students many steps in order to get to certain areas (deep within the portal).
I want to be able to provide direct links to specific URLs within the portal .. so a user can click on a link .. and then go directly to that page (section within the portal).
The problem (as you can imagine is) ... that if a student isn't logged into the portal (prior to clicking on the link to the URL within the portal) they get a message that says "You are not authorized to access this area."
What I am hoping to do .. and would like to know if a cgi script can be put together to do this is ....
1) The user clicks on a link (to a particular page .. that exisits deep within the portal) - from another webpage on the University website. The reason is to allow different departments on campus .. to provide direct access to specific information contained within the portal.
2) If the user was not already logged into the Portal (which would most likely be the case, but not always .. but mostly) ... when the user clicks on the link .. the CGI script would first need to see if they were logged into the Portal .. and if not ... the CGI script would take the user to a page where the student could log in. Then once the student logs in ... and their login is accepted .. the CGI script would re-direct the student to the webpage (URL) that they originally clicked on (in the link) that they tried to access.
If the student was already logged in .. prior to clicking on the link .. the CGI script would simply redirect the user to the page they are trying to access.
Is this possible to accomplish using a CGI script? I am expecting that when the user clicks on a link .. the link is passed into the CGI script ... and then the script determines if the user is logged in .. and if not .. allows the user to log in. Then, once logged in .. the script would redirect the user to the appropriate URL (which was passed via the link).
I need help with someone to possibly show me exactly how to write this script.
Is this possible? If so, ... please help.