NewbieRob
Posts: 20
|
| Posted: 04/17/2007, 1:44 PM |
|
Does anyone have some insight on how to implement the following custom login solution?
I need to link non-CCS login forms that are part of a website to the CCS 3 extranet I am building for a client. I am am building security for the extranet into the CCS project. All of this works great as long as I stay in CCS. However...
This client wants to put a login form for their extranet on each of the pages of their non-secured website. I am developing the extranet in CCS 3 but a web developer built and maintains their public website. Yes Support suggests that I, "Create a non-CCS HTML form on the public website that looks the same way as the Login form in CCS. And point that form to the CCS ASP script that will perform the login." This is apparently similare to what the web developer I'm working with has done in the past with other clients. However, all she has done is create the form and turn it over to other programmers to finish the work so she is no help in the ASP area.
I'm not sure how to do this. This entails multiple pages that will have the login form but they all need to "point" to the CCS ASP script that will actually perform the login. I am mostly a systems and Access database guy so any pointers anyone can give me will be most appreciated. Thanks in advance, ROB.
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 04/17/2007, 7:07 PM |
|
Integrating a non-CCS app to log into a CCS app is very simple.
In our application, our configurator generates a login snippet of html.
It looks as follows:
<form method="post"
action="http://www.mydomain.com/mydirectory/Login.asp?ccsForm=Login"
name="Login"><table cellspacing="1" cellpadding="3">
<tr><td align="center" nowrap>Login </td><td><input name="login"
value="" maxlength="50"></td></tr>
<tr><td align="center" nowrap>Password </td><td><input type="password"
name="password" value="" maxlength="50"> </td></tr>
<tr><td colspan="2" align="right" nowrap><input name="Button_DoLogin"
type="submit" value="Login"> </td></tr></table></form>
Essentially, you point it to your login page. The important thing here is
the ?ccsForm=Login.
This is for a login page generated with the Login builder.
When the snippet posts the request, it is placing the script into processing
mode instea of display mode by telling it to process the form named Logi".
|
|
|
 |
ducati996guy
Posts: 46
|
| Posted: 04/21/2007, 3:24 PM |
|
Hi,
You would need to create a custom asp script which looked up the user details in your database and confirm they are correct.
If the credentials are valid, then set the session variables and pass control back to the codecharge page you want the user to see.
Codecharge uses the following session vars
session("userid")
session("groupid")
session("userlogin")
Your current project would have a table for login detail already set if you are using codecharge security.
So the code would do the following:
1. Get the form post details
2. Lookup the user table and confirm the login is allowed
3. Set the session vars based on the user record
4. Response.redirect to the codecharge page you want to display.
Hope this helps.
Regards
David
_________________
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)
www.CustomerCommunity.com.au
|
 |
 |
NewbieRob
Posts: 20
|
| Posted: 04/23/2007, 8:57 AM |
|
Thank you both for your comments. It looks like Benjamin's solution may be the easiest to implement. So the basic method is to set up a form on any page in our website that contains fields that match those on the CCS-generated Login page? Then when the user clicks the Login button the session variables for the ID/PWD are captured and control is transfered to the CCS Login page (that I already know works) which processes the information. Is that correct? Is it "?ccsForm=Login" that makes the CCS Login form do the processing but not display?
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 04/23/2007, 3:24 PM |
|
Correct.
the ccsForm=Login is placing the script in "processing" mode for the "Login"
record in the page.
|
|
|
 |
NewbieRob
Posts: 20
|
| Posted: 04/30/2007, 10:42 AM |
|
This looks like it is working well if the user logs in correctly. If they leave out either the Login or Password it defaults back to the CCS Login page (naturally). Is there a way to capture the HTML page they logged in from, and pass control back to it if there is an error?
|
 |
 |