#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4

    Form authenitication and redirect


    Hi Expert,

    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?
    thanks
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    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?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4
    Hi,

    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)

    thanks
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    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?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4
    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
    2- authenticate
    3- redirect ( get ) to the right form directly


    not sure if it is clear Kitless ?

    Thanks
  10. #6
  11. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    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.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4
    Sorry kitlesss,,

    i am lost completely....You're talking to a CF newbie..
    Can you elaborate more please if possible ?

    thanks
  14. #8
  15. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    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).

IMN logo majestic logo threadwatch logo seochat tools logo