I need the correct format for a login link please

bkeep

New member
Joined
Apr 27, 2007
Messages
4
I was looking at this thread and tried this
http://help.directadmin.com/item.php?id=61

Code:
http://yourdomain.com:2222/CMD_LOGIN?username=username&password=password

I also gather this is optional

Code:
&FAIL_URL=http://www.yourdomain.com/fail.html&LOGOUT_URL=http://www.yourdomain.com

Is the formating correct?

Is the FAIL_URL something that has to be created or is it always there?
same thing goes for the LOGOUT_URL.

Just curious because I created a login script for AWBS to cpanel logins. I would like to try and get it working the script doesn't use forms it builds links from the user info stored in the database then can log them in automagicly.

Best Regards,
Brandon
 
Can anyone help with this please?
Is it at all possible to do this?
 
http://help.directadmin.com/item.php?id=61

This method can print out the form with the username and password already filled. You have to insert the values for them in the form. With a little javascript you can have it autosubmit when the page loads.

Code:
<SCRIPT LANGUAGE="JavaScript">
        document.form.submit();
</SCRIPT>
 
vaiiables via browser

http://help.directadmin.com/item.php?id=61

This method can print out the form with the username and password already filled. You have to insert the values for them in the form. With a little javascript you can have it autosubmit when the page loads.

Code:
<SCRIPT LANGUAGE="JavaScript">
        document.form.submit();
</SCRIPT>

Is there no way to pass the variables via the browser? Seems to me that a form with hard coded variables isn't that secure.

Another view is that by passing them via the browser one wouln't have to have multiple forms for mutliple logins.

T
 
tlchost said:

Seems to me that a form with hard coded variables isn't that secure.

They are not hard coded. And in fact cannot be hard coded.

bkeep said:

it builds links from the user info stored in the database

He is building the link dynamically from a database that contains the username and password a link to the server that user is on.

The method I am suggesting (and actually using) is to output to the browser the login form with the username and password already filled out. Keep in mind that this is not hard coded but generated dynamically from the database. Then have the JavaScript automatically submit the form.

At worst if they have JavaScript turned off then they just have to click login again. The username and password is already filled from the script that retrieved it from the database.

So from the beginning. The user fills out a login form and it posts to a script which then retrieves the server that the user is assigned to from a database. The script outputs a html page with the login form again with the username and password already filled out but this time since we now know which server to actually post the login to then JavaScript automatically does the submit. Most of the time the user will never see the second login form.
 
Code would help

tlchost said:
The method I am suggesting (and actually using) is to output to the browser the login form with the username and password already filled out. Keep in mind that this is not hard coded but generated dynamically from the database. Then have the JavaScript automatically submit the form.
.

Ah....OK....could you post the code(not just the javascript part)

Thanks in advance.

Thom
 
using the form it will login I was just trying to use a standard link
that will work to automagicly login.

Code:
<form action="https://youriporURl:2222/CMD_LOGIN" method="POST" name="form">
<input type="hidden" name="username" value="user" />
<input type="hidden" name="password" value="user" />
<input type="hidden" name="domain" value="demo.com" />
<input name="submit" value="Submit" />
</form>
for me the fields are hidden and I pull data from a database to fill the fields you can make them not hidden if you so choose so your users can insert alternative login info

from my finding it has to be a POST command so I did some looking on google and found some functions for POST procedures without using a form. I have not gotten around to seeing if they work or implementing them.

The main reason I didn't want to use a form is for whatever reason the hidden input fields bork up my design

this is a screen shot of what it is supposed to look like. When I use the form it breaks the side buttons and makes them wrap small issue but an issue none the less and that is using an image instead of a button.

http://alias454studios.com/downloads/cLogin_screen.jpg


this is the Cpanel URL the gets built Cpanel must use GET(I am surmising)
Code:
https://$a_row[ip]:2083/login/?user=$a_row[username]&pass=$a_row[pass]

Regards,
Brandon
 
Last edited:
The main reason I didn't want to use a form is for whatever reason the hidden input fields bork up my design

So if you do not use an initial login form for the user to login how do you know what the link is, username, and the password??

Maybe you need to start at the beginning and tell us all the steps you want from the time the user gets to your home page until they are logged into DA. I just don't see how they are going to login without some kind of form at some point for them to fill in their username and password. They are going to have to do that at some point.
 
Last edited:
To break it down

This is for AWBS billing/management system

The user creates an account
then said user orders a hosting account. Their login and password credentials for the account are automaticly created and emailed to them

When the user comes back to the AWBS system they will have to login there then they can click on a link "manage hosting account(s)"

the user then goes to the page for management and clicks on the link to be logged into the Hosting control panel.

The idea behind it is in the case of persons who have multiple hosting accounts to not have to remember several different account logins.

The info is dynamically loaded from the info that was originally generated for them. I do understand that if the user changes their password in their control panel the login feature will not work automagically but at that point they will still be taken there and given the login boxes.

I currently use this for a Cpanel script and it seems to work pretty good I was just looking for a way to make that script a little more versatile by adding in other control panels. As I have said the use of forms doesn't work well with my layout. What I am looking for is a way to build the link then perform the post operations(without using a form) then pass the info to the server and be logged in

Using javascript links to run a js function would probably be ok except I know about as much javascript as I do asp

Hope that helps to clarify things
Regards,
Brandon
 
Last edited:
I thought you were a programmer and was also using a custom script to work with AWBS. A programmer would probably know how to do what I was talking about.

You could create a link that sent the information via GET to your own custom script which then created the form with the JavaScript to automatically post. The user would never see that form and they would automatically be logged into the control panel.
 
All you have to do is create a link in AWBS to send the username and password and control panel link to your own script that then takes that information and send back to the browser this form:

Code:
<NOSCRIPT>
You do not have JavaScript enabled. Please enable JavaScript. Click 
Login to continue.
</NOSCRIPT>


<form action="http://$in{'control_panel_link'}:2222/CMD_LOGIN"
method="POST" name="form">

<input type=hidden name=referer value="/">
<input type=hidden name=FAIL_URL value="http://$in{'control_panel_link'}:2222/CMD_LOGIN">
<input type=hidden name=LOGOUT_URL value="http://$in{'control_panel_link'}:2222/CMD_LOGIN">

Username:<input type=text name=username value="$in{'username'}">
Password:<input type=password name=password value="$in{'password'}">
<input type=submit value='Login'>

<SCRIPT LANGUAGE="JavaScript">
        document.form.submit();
</SCRIPT>

The end user will never see the form unless they do not have JavaScript enabled.

The problem with the hidden fields in your form in AWBS is probably because you are including them in tables cells. Put the hidden fields somewhere on the page outside of the cells.
 
Back
Top