August 5th, 2011, 11:38 AM
Form authenitication and redirect
i have a webform that holds user athentication information.
to get that webfom, user has to login to a certain tool. This tools holds a lot of information that i wont the user tohave access to..
I need to put the link to the form public ( intranet) but i want to have the user authenticated inthebaceknd and have access to the form ..
The option i have is to build another auth login for that specific form .. but i thought that would exist another way to where the user clicks the form link , he will be authenticate and redirect the user to the form .
Any suggestions please?
August 5th, 2011, 01:27 PM
I don't really follow what you're asking. You want the user to be able to use form that holds user authentication information, but you want to make them log in somewhere else before they can get to that form?
August 5th, 2011, 01:47 PM
For this specific form only , I want them to loggin but be redirected automatically to the form.
I do not want them to loggin and have access to the other menus of the tool.
( i am providing the link of the mform on another page)
August 5th, 2011, 01:57 PM
Can't you just have the template that does the login processing redirect them to the form with a cflocation after the login is successful?
August 5th, 2011, 02:05 PM
Yes but how i know that is the correct form required..
The scenario am looking for is the following :
1- user clicks the hyperlink of the form
3- redirect ( get ) to the right form directly
not sure if it is clear Kitless ?
August 5th, 2011, 02:13 PM
Where you're doing the redirect, you can either pass a URL value with the redirect that will tell the login processing page where to redirect the user back to, or you can set a session variable to specify what form the user was trying to get to, and use that session variable in the login processing logic to determine where to redirect them after they log in.
August 5th, 2011, 02:19 PM
i am lost completely....You're talking to a CF newbie..
Can you elaborate more please if possible ?
August 5th, 2011, 07:46 PM
Well to be honest, what I described is a really basic process. So if it's really that confusing to you, you almost certainly need to stop right now and either read through the CF documentation or pick up a book. Because if this is confusing you, you're just going to get increasingly frustrated going forward.
With the first suggestion, I mean creating a cflocation with a url that looks something like "login.cfm?returnpage=myform". This way after you do the login you know they came from the form and you can redirect them back with another cflocation.
On the second suggesion, I mean doing something similar but instead of passing the return page as a URL parameter, set it up as a session variable (session.returnpage="myform"). Then after they log in, you can look at session.returnpage and know that you need to redirect them to the original page (your form).